Adds support for protocol relative URLs in location header
`url.parse` doesn't parse protocol relative URLs, but they are valid in location headers according to RFC7231 (https://tools.ietf.org/html/rfc7231#section-7.1.2, and specified in RFC3986 https://tools.ietf.org/html/rfc3986#section-4.2) This commit fixes that by temporarily adding an `http:` to a URL that begins with `//` before parsing and removing the protocol before formatting.
Showing
+41 -1
Please register or sign in to comment