Skip to content

Add stable weighted header preferences. - #118

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
stable-weighted-header-preferences
Aug 10, 2026
Merged

Add stable weighted header preferences.#118
samuel-williams-shopify merged 1 commit into
mainfrom
stable-weighted-header-preferences

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary.

  • Add stable preference ordering for Accept-Charset, Accept-Encoding, Accept-Language, and TE.
  • Share quality-factor ordering through a protected Header::Split helper.
  • Refactor Accept#preferred_media_ranges to use the shared implementation.
  • Preserve each parsing method as the source-order interface and retain direct .sort compatibility.

Verification.

  • Weighted-header tests: 68 tests, 157 assertions.
  • Full suite: 765 tests, 1552 assertions.
  • RuboCop passes for all changed Ruby files.
  • git diff --check passes.

@samuel-williams-shopify
samuel-williams-shopify merged commit 69605fc into main Aug 10, 2026
28 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the stable-weighted-header-preferences branch August 10, 2026 00:33
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