Net.HTTP.HeaderName
The name of a header field: a token, stored lowercase, since field names are case-insensitive and HTTP/2 sends them lowercase.
Reserved names are refused. The fields that frame a message or
route it -- how long the body is, whether the connection stays open,
which host it is for -- are written by the HTTP library from the request
or response it sends, never by the program. A program that could set
Content-Length or Transfer-Encoding beside the library's own could
frame one message two ways, which is how request smuggling works. So
parse refuses those names, and no HeaderName for them exists: a value
of this type is a field a program may write.
The fields the library writes itself, lowercase. HTTP/2 forbids or replaces most of them.
Whether s, in any case, names a reserved field.
Returns s as a header name, and panics if it is not a token or is
reserved: a name written in the program's source that is either is a
mistake in the program.
Returns the name, lowercase.
A field name: a token, lowercase, never one of the reserved names.