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

fix(encoding): take the first encoding supported #205

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

ssoroka
Copy link
Contributor

@ssoroka ssoroka commented Feb 25, 2024

Browsers submit multiple supported encodings, such as
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

By the time this function gets the accept header encoding, the part after the ; has been removed, so we still need to split by , and find the first one we support.

Copy link

codecov bot commented Feb 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.49%. Comparing base (b453166) to head (181b8c6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #205   +/-   ##
=======================================
  Coverage   98.48%   98.49%           
=======================================
  Files          24       24           
  Lines         728      732    +4     
=======================================
+ Hits          717      721    +4     
  Misses          6        6           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abemedia abemedia changed the title fix the encoder to take the first encoding supported fix(encoding): take the first encoding supported Feb 25, 2024
@abemedia
Copy link
Owner

Thanks for this! Would you mind adding a test though?

@ssoroka
Copy link
Contributor Author

ssoroka commented Mar 17, 2024

added tests and rebased master. Not sure why the CI checks aren't running.

@abemedia
Copy link
Owner

Looks good, thanks again!

@abemedia abemedia merged commit 3f53fd0 into abemedia:master Mar 18, 2024
11 checks passed
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.

2 participants