exceptionless / Exceptionless.JavaScript

Exceptionless JavaScript client
http://exceptionless.com
Apache License 2.0
59 stars 24 forks source link

url parse is wrong #79

Closed a26364177 closed 6 years ago

a26364177 commented 6 years ago

exceptionless.node.js 2076 var protocol = (parsedHost.protocol === 'https' ? https : http);

url.parse(request.url).protocol always be 'https:'.

so self host https will be wrong.

niemyjski commented 6 years ago

That's picked up from the passed in from the configuration server url property. If that is https than it will always be sent as https, otherwise http request will be made. Does this resolve this issue?

a26364177 commented 6 years ago

exceptionless.node.js 2059 var parsedHost = url.parse(request.url); var protocol = (parsedHost.protocol === 'https' ? https : http);

url.parse will catch protocol as 'https:' not 'https' so ervery https url will link to http.

niemyjski commented 6 years ago

Ahhh, do you have a link to the documentation for the parse that shows this? In my tests I was always getting the https client. Also what version of node are you using

a26364177 commented 6 years ago

nodejs doc https://nodejs.org/docs/latest/api/url.html#url_url_protocol

My nodeJs version is v8.9.0.

niemyjski commented 6 years ago

Thanks for reporting this, I'll work on getting out a release out in the morning.