Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: Request.ReadRequest() should not delete Request.Header["Host"] #13134
I think Request.Header["Host"] should not be deleted when parsing the request.
For example, if I use the net/http to write a proxy server, listening on
The proxy should deliver the
The Host header is put into the Request.Host field:
It's been like that for ages. Changing it now, regardless of whether it's a good idea, would be a incompatible change.
In any case, you seem to have a concrete problem about writing a proxy. Let's discuss that instead on one of the forums: https://golang.org/wiki/Questions