Created by: bruderstein
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.