Skip to content

Content length handling - #109

Merged
sethmlarson merged 3 commits into
python-hyper:masterfrom
pgjones:c-l
Oct 5, 2020
Merged

sethmlarson merged 3 commits into
python-hyper:masterfrom
pgjones:c-l

Conversation

@pgjones

@pgjones pgjones commented Oct 4, 2020

Copy link
Copy Markdown
Member

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

pgjones commented Oct 4, 2020

Copy link
Copy Markdown
Member Author

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

@codecov

codecov Bot commented Oct 4, 2020 •

Copy link
Copy Markdown

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.

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Member

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.

Comment thread h11/_headers.py Outdated
Comment thread h11/_headers.py Outdated
Comment thread h11/_headers.py Outdated
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.

@StephenBrown2 StephenBrown2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems good to me.

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Member

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