You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When following a redirect (e.g. 302), doFollowingRedirects will call URL.Parse() on the
value of the Location header, then use URL.String() from the resulting object as the new
URL. URL.String(URL.Parse(x)) doesn't round-trip. In particular, %2F gets flattened to
"/" but never converted back. This caveat is noted here:
http://golang.org/pkg/net/url/#URL.
As a result, a server can't actually redirect a Go client to a URL with %2F in it. This
disagrees with the behavior of at least Chrome and curl.
I expect the best option here is to make URL.Parse / URL.String round-trip, since the
%2F exception is weird and surprising. At the very least, net/http should keep the
verbatim URL when redirecting.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: