Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: document that Header.Set canonicalizes the header key #27923
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
changed the title
http.Header.Set() fails to keep same string format for its keys.
Sep 28, 2018
We can document this more but we can't (and shouldn't) change it.
Also it shouldn't matter, as @bontibon pointed out. (In HTTP/2 headers can't even have case.)
If you really need to talk to a broken HTTP/1 server that distinguish cases, you can set the map value directly without using the accessor methods.