Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate AcceptEncodingXXXHeader classes into the single AcceptEncoding class #462

Open
wants to merge 1 commit into
base: simplify-accept-charset-parsing
Choose a base branch
from

Conversation

mmerickel
Copy link
Member

@mmerickel mmerickel commented Mar 2, 2024

  • Ensure AcceptEncoding instances are immutable.
  • Merge missing/invalid/valid into the single instance - there were very very minor differences between the classes.
  • Delete deprecated __iter__.
  • Reimplement best_match, quality, and __contains__ methods using acceptable_offers.
    • A tuple can no longer be an offer containing server-side quality values.
    • An offer will only match a * clause in a header if it does not match
      any other clauses.
    • The identity offer was not properly considered a match unless the
      header explicitly it excluded via *;q=0 or identity;q=0.

@mmerickel mmerickel force-pushed the simplify-accept-encoding-parsing branch from 6f8e3c2 to 07db20b Compare March 2, 2024 21:30
@mmerickel mmerickel force-pushed the simplify-accept-charset-parsing branch from 7359d70 to 6fc063e Compare March 2, 2024 21:34
@mmerickel mmerickel force-pushed the simplify-accept-encoding-parsing branch from 07db20b to d19faa7 Compare March 2, 2024 21:35
@mmerickel mmerickel force-pushed the simplify-accept-charset-parsing branch from 6fc063e to 0afa9f2 Compare March 4, 2024 01:02
@mmerickel mmerickel force-pushed the simplify-accept-encoding-parsing branch from d19faa7 to 50f6669 Compare March 4, 2024 01:04
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