Skip to content

Make HTTPFields hashing consistent with equality - #143

Open
Hashim1999164 wants to merge 1 commit into
apple:mainfrom
Hashim1999164:hash-httpfields-match-equality
Open

Make HTTPFields hashing consistent with equality#143
Hashim1999164 wants to merge 1 commit into
apple:mainfrom
Hashim1999164:hash-httpfields-match-equality

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

HTTPFields equality does not depend on the order of differently named fields. Hashing used storage order, so equal values could hash differently.

This hashes each name group in relative order, then mixes those group hashes without depending on name order. The existing hash test now asserts equal hashes.

Fixes #139

Test plan

Run the package tests on macOS. Confirm hashMatchesEqualityForDifferentOrder passes without a known issue wrapper.

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.

Hash implementation does not match Equals implementation

1 participant