Repository navigation
fix: match complete Accept-Encoding tokens - #2479
Merged
erikdubbelboer merged 3 commits intoOct 17, 2026
Merged
erikdubbelboer merged 3 commits into
erikdubbelboer merged 3 commits into
Conversation
erikdubbelboer
requested changes
Oct 13, 2026
Collaborator
|
Thanks! |
Contributor
Author
|
Thanks for the review and for catching the punctuation case! |
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.
HasAcceptEncodingandHasAcceptEncodingBytesnow scan complete comma-separated tokens, trim optional whitespace, and compare token letters without case sensitivity. Prefix/suffix substrings still do not match; this does not add quality-value or wildcard negotiation.The shared comparator uses the existing ASCII lowercase table, preserving punctuation instead of folding every byte with
| 0x20. In particular, custom encodings containing^and~remain distinct. Regression cases cover both public APIs, positive mixed-case custom encodings, all 65,536 byte pairs, and compression through a real request/response round-trip.Validation
4ebca700c80b684cf8db9e2335fa24639ad5565b: complete shuffled tests and complete race tests pass on Linux, macOS and Windows with Go 1.26 and 1.27. Repository golangci-lint v2.14.0 passes. All nine jobs are successful; the validation-only workflow is outside this PR.^/~in both directions. The original pre-feature base also fails the token/compression regressions.go vet ./...passes, and all five token benchmarks retain zero allocations. The complete local run fails only the unchanged direct-dial expectation inTestDialerGetDialFuncForTLSNoProxy; the same case fails three times on the unmodified base. I have not changed or skipped it.