-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fixed missing CRLF at end of a chunk in malformed chunked encoding me… #10359
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10359 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 122 122
Lines 37038 37089 +51
Branches 2041 2045 +4
=======================================
+ Hits 36585 36636 +51
Misses 314 314
Partials 139 139
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #10359 will not alter performanceComparing Summary
|
It is not clear how to make the |
@@ -1761,6 +1761,69 @@ async def test_parse_chunked_payload_split_end_trailers4( | |||
assert out.is_eof() | |||
assert b"asdf" == b"".join(out._buffer) | |||
|
|||
async def test_parse_chunked_payload_split_CRLF( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get a test that uses the response: HttpResponseParser
fixture, rather than using HttpPayloadParser directly?
I think we'd want to ensure that both parsers work the same way, this only tests the Python parser (which is not used by most users).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is this second parser ?
Please bear with me, I have only been looking at aiohttp source code for few days.
The tests check the changes made in HttpPayloadParser, not in the second parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you use the fixture as mentioned above, the test will be run against both parsers (i.e. run twice).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did not answer my question. Please, what is the name of the second parser ?
Why should changes that affect HttpPayloadParser be tested against the second parser ?
What if the tests against the second parser fail ?
In that case:
- do you consider that these failures must be fixed within this PR ?
- would'nt it be better to update the title of the PR and the issue to restrict their scope to HttpPayloadParser ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a Python parser and a C parser (llhttp). Both should behave the same way, hence why we have a fixture to run the same tests against both parsers.
See issue #10355.