-
-
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
Support setting response header size limits #6559
Conversation
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.
Will need some tests for the new behaviour to have any chance of being merged, which would also have highlighted the below issue.
When will this change be approved? This issue is very important to the use of the library. |
There is a test failure, which I've not looked at closely yet. It's not one I've seen before though. |
This is the test that failed: https://github.com/aio-libs/aiohttp/runs/5072020477?check_suite_focus=true#step:10:3041 |
Hello @Dreamsorcerer! Is it possible to merge this PR ? :) Thanks |
Codecov Report
@@ Coverage Diff @@
## master #6559 +/- ##
=======================================
Coverage 97.31% 97.31%
=======================================
Files 107 107
Lines 31414 31484 +70
Branches 3927 3937 +10
=======================================
+ Hits 30569 30639 +70
Misses 641 641
Partials 204 204
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Backport to 3.9: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply ecd9c72 on top of patchback/backports/3.9/ecd9c72697ca1529e7cae4693775612987a2a6d2/pr-6559 Backporting merged PR #6559 into master
🤖 @patchback |
If someone could handle the backport to 3.9 as above, that'd be great. |
Awesome to see this change coming 😃 . Is there any ETA of the 3.9 release? |
Not yet, but still waiting on the backport to 3.9, if you'd like to help out: |
<!-- Thank you for your contribution! --> Allow the user to set the response header limits. The properties max_line_size, max_headers and max_field_size can be set on ClientSession creation. Default values are: `max_line_size=8190` `max_headers=32768` and `max_field_size=8190`. Thus the user can set and - when needed - receive bigger response headers. No - [x] I think the code is well written - [x] Unit tests for the changes exist - [ ] Documentation reflects the changes - [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` * The format is <Name> <Surname>. * Please keep alphabetical order, the file is sorted by names. - [x] Add a new news fragment into the `CHANGES` folder * name it `<issue_id>.<type>` for example (588.bugfix) * if you don't have an `issue_id` change it to the pr id after creating the pr * ensure type is one of the following: * `.feature`: Signifying a new feature. * `.bugfix`: Signifying a bug fix. * `.doc`: Signifying a documentation improvement. * `.removal`: Signifying a deprecation or removal of public API. * `.misc`: A ticket has been closed, but it is not of interest to users. * Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files." --------- Co-authored-by: Josef Prenner <josef@cloudomation.com> Co-authored-by: Sam Bull <aa6bs0@sambull.org> (cherry picked from commit ecd9c72)
…559 (#7264) <!-- Thank you for your contribution! --> ## What do these changes do? This an attempt at a backport following these guidelines - #6559 (comment) . Note, haven't done a backport so no clue if I'm completely missing something or it was as simple as resolving the merge conflicts when cherry-picking that work in. See #6559 (comment) --------- Co-authored-by: jorop <jorop@users.noreply.github.com> Co-authored-by: Sam Bull <aa6bs0@sambull.org>
What do these changes do?
Allow the user to set the response header limits. The properties max_line_size, max_headers and max_field_size can be set on ClientSession creation. Default values are:
max_line_size=8190
max_headers=32768
andmax_field_size=8190
.Thus the user can set and - when needed - receive bigger response headers.
Are there changes in behavior for the user?
No
Related issue number
#2304
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.