Closed konovalovsergey closed 2 years ago
Relative url to http.request leads to invalid request For example http.request('/foo.bar') https://github.com/node-modules/urllib/blob/dbfcd6ef01cd925beeef1f80fabe0edd259d6aac/lib/urllib.js#L232
http.request('/foo.bar')
parsedUrl = { "protocol": "http:", "slashes": true, "auth": null, "host": "foo.bar", "port": null, "hostname": "foo.bar", "hash": null, "search": null, "query": null, "pathname": "/", "path": "/", "href": "http://foo.bar/" }
request is sent to http://foo.bar:80 before 514de1924bf17a38a6c2db2a22a6bc3494c0a959 it was
parsedUrl = { "protocol": "http:", "slashes": true, "auth": null, "host": "", "port": null, "hostname": "", "hash": null, "search": null, "query": null, "pathname": "/foo.bar", "path": "/foo.bar", "href": "http:///foo.bar" }
request is sent to http://localhost:80/foo.bar
Relative url to http.request leads to invalid request For example
http.request('/foo.bar')
https://github.com/node-modules/urllib/blob/dbfcd6ef01cd925beeef1f80fabe0edd259d6aac/lib/urllib.js#L232request is sent to http://foo.bar:80 before 514de1924bf17a38a6c2db2a22a6bc3494c0a959 it was
request is sent to http://localhost:80/foo.bar