Skip to content

Content length handling #109

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

Merged
merged 3 commits into from
Oct 5, 2020
Merged

Content length handling #109

merged 3 commits into from
Oct 5, 2020

Conversation

pgjones
Copy link
Member

@pgjones pgjones commented Oct 4, 2020

Fixes #92

StephenBrown2 and others added 2 commits October 4, 2020 13:34
This ensures that duplicate content length headers with a value of
b"0" are correctly considered.
@pgjones
Copy link
Member Author

pgjones commented Oct 4, 2020

@tomchristie & @sethmlarson @StephenBrown2 Does this look good to you? I think it is probably worth getting into the next release.

@codecov
Copy link

codecov bot commented Oct 4, 2020

Codecov Report

Merging #109 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   99.16%   99.17%           
=======================================
  Files          21       21           
  Lines         959      966    +7     
  Branches      175      178    +3     
=======================================
+ Hits          951      958    +7     
  Misses          7        7           
  Partials        1        1           
Impacted Files Coverage Δ
h11/tests/test_headers.py 100.00% <ø> (ø)
h11/_headers.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d92213...b53ff2a. Read the comment docs.

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some performance optimizations, looks good otherwise.

If duplicated exactly when merged into a comma seperated list (the
unmerged case is handled already). This is allowed as per RFC 7230
Section 3.3.2.
Copy link
Contributor

@StephenBrown2 StephenBrown2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me.

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this!

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.

Handle multiple Content-Length headers with the same value
3 participants