Skip to content

Do not fix case of header key#1063

Merged
ArneBab merged 1 commit into
hyphanet:nextfrom
torusrxxx:DoNotFixHeaderKey
Jun 22, 2025
Merged

Do not fix case of header key#1063
ArneBab merged 1 commit into
hyphanet:nextfrom
torusrxxx:DoNotFixHeaderKey

Conversation

@torusrxxx

Copy link
Copy Markdown
Contributor

There isn't broken HTTP clients. All headers are forced lower-case by HTTP/2. Don't need to do this a dozen times for every request.

@bertm bertm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically we should use proper casing where we can. RFC 2616 (HTTP/1.1) section 4.2 Message Headers states the following:

Applications ought to follow "common form", where
one is known or indicated, when generating HTTP constructs, since
there might exist some implementations that fail to accept anything
beyond the common forms.

Per the Hypertext Transfer Protocol (HTTP) Field Name Registry
all the header names are capitalized, so that would be the "common form" for generating those header names.

That said: meh, let's not do magic header name rewriting (reasonable client should read them case insensitive). If this does cause an issue (which it won't), fix it at the source (where the incorrectly capatilized header name is used).

HTTP/2 is not relevant though, as fred does not speak that.

@ArneBab ArneBab merged commit ea0301e into hyphanet:next Jun 22, 2025
@torusrxxx torusrxxx deleted the DoNotFixHeaderKey branch June 23, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants