net/http: Client following redirects won't preserve Host header #22233
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
It seems that #8027 was not resolved in #4800. In #4800, custom headers are copied, however,
Host
field inhttp.Request
is not preserved even if theLocation
header is just a relative path, see following Go playground link for example:https://play.golang.org/p/CG45o1eBz8
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: