For incoming requests, the Host header is promoted to the
Request.Host field and removed from the Header map.
HTTP defines that header names are case-insensitive. The
request parser implements this by using CanonicalHeaderKey,
making the first character and any characters following a
hyphen uppercase and the rest lowercase.
For client requests, certain headers such as Content-Length
and Connection are automatically written when needed and
values in Header may be ignored. See the documentation
for the Request.Write method.
Header contains the request header fields either received by the server or to be sent by the client.
If a server received a request with header lines,
Host: example.com accept-encoding: gzip, deflate Accept-Language: en-us fOO: Bar foo: two
then
For incoming requests, the Host header is promoted to the Request.Host field and removed from the Header map.
HTTP defines that header names are case-insensitive. The request parser implements this by using CanonicalHeaderKey, making the first character and any characters following a hyphen uppercase and the rest lowercase.
For client requests, certain headers such as Content-Length and Connection are automatically written when needed and values in Header may be ignored. See the documentation for the Request.Write method.