Repository navigation
Conversation
krzysdz
commented
Oct 4, 2026
krzysdz
marked this pull request as draft
October 4, 2026 02:09
krzysdz
marked this pull request as ready for review
October 5, 2026 01:56
krzysdz
added a commit
to krzysdz/express
that referenced
this pull request
Oct 5, 2026
…not present The new acceptsEncodings test will fail. I consider this to be a bug in jshttp/accepts. jshttp/accepts#83 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #82
typeof this.headers['accept-encoding'] !== 'string'was chosen as condition, because:!this.headers['accept-encoding']istruealso for an empty header (empty string), which means that only identity encoding is accepted (empty header != no header)!Object.hasOwn(this.headers, 'accept-encoding')does not play well with the tests, because the property (in tests) always exists and isundefinedwhen simulating a "nonexistent" headerNote
Another possibility would be returning
'identity'if it exists inencodings(highest priority) like suggested in RFC 2616, but probably there is a reason why RFC 7231 and RFC 9110 removed this wording.The more I look into this, the more I think it may be better to change it on the
negotiatorside.