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

Simplified parse_content_header escaping #2707

Merged
merged 2 commits into from
Mar 6, 2023
Merged

Conversation

Tronic
Copy link
Member

@Tronic Tronic commented Mar 6, 2023

Firefox has changed its escaping to conform with Chrome and https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data since when this function was originally implemented, and now escapes quotes as %22.

This PR updates the function to be RFC-compliant, removing that Firefox hack.

@Tronic Tronic requested a review from a team as a code owner March 6, 2023 00:29
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.048 ⚠️

Comparison is base (cb49c2b) 88.705% compared to head (2f61b50) 88.658%.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2707       +/-   ##
=============================================
- Coverage   88.705%   88.658%   -0.048%     
=============================================
  Files           87        87               
  Lines         6853      6851        -2     
  Branches      1177      1177               
=============================================
- Hits          6079      6074        -5     
- Misses         533       534        +1     
- Partials       241       243        +2     
Impacted Files Coverage Δ
sanic/headers.py 96.059% <ø> (-0.039%) ⬇️
sanic/server/websockets/impl.py 37.557% <0.000%> (-0.922%) ⬇️
sanic/http/http1.py 84.246% <0.000%> (+0.684%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ahopkins ahopkins merged commit 259e458 into main Mar 6, 2023
@ahopkins ahopkins deleted the parse-content-header branch March 6, 2023 04:39
Tronic added a commit that referenced this pull request Mar 6, 2023
* tracerite var colors

* Simplified parse_content_header escaping (#2707)

* Move comments, darken bg color, move debug links to contextmanager

* Lineup H2s

* Make pretty

---------

Co-authored-by: L. Kärkkäinen <[email protected]>
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