Skip to content

Compare whole fields in the lock-step branch of HTTPFields.== - #152

Open
lenamonj wants to merge 1 commit into
apple:mainfrom
lenamonj:fields-equality-whole-field
Open

Compare whole fields in the lock-step branch of HTTPFields.==#152
lenamonj wants to merge 1 commit into
apple:mainfrom
lenamonj:fields-equality-whole-field

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 3, 2026

Copy link
Copy Markdown

The lock-step branch of HTTPFields.== compared only name and value, while the pending branch, isEqualByNameIndex and hash(into:) compare whole HTTPField values. Two lists differing only in indexingStrategy, or in raw bytes that decode to the same replacement character, compared equal on that path and unequal on every other, and hashed differently, so a Set could hold both.

The branch now compares whole fields. The new test fails on main and passes with the change; swift test with the CI flags is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant