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

#2304 add max_line_size, max_headers and max_field_size arguments to ClientSession #6720

Closed
wants to merge 0 commits into from

Conversation

starflows
Copy link
Contributor

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 and max_field_size=8190.
Thus the user can set and - when needed - receive bigger response headers.

Are there changes in behavior for the user?

no, default values are unchanged.

Related issue number

#2304
#2988
#3862

Checklist

  • I think the code is well written
  • 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.
  • 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."

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Apr 27, 2022
@starflows
Copy link
Contributor Author

FYI: the unittest

async def test_max_headers_session_default_fail(aiohttp_client: Any) -> None:
is marked as xfail due to #6721

@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #6720 (188852b) into master (0215cdd) will decrease coverage by 0.00%.
The diff coverage is 92.37%.

@@            Coverage Diff             @@
##           master    #6720      +/-   ##
==========================================
- Coverage   93.36%   93.36%   -0.01%     
==========================================
  Files         104      104              
  Lines       30631    30749     +118     
  Branches     3077     3096      +19     
==========================================
+ Hits        28599    28708     +109     
- Misses       1859     1868       +9     
  Partials      173      173              
Flag Coverage Δ
unit 93.28% <92.37%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/client.py 24.35% <0.00%> (-0.48%) ⬇️
aiohttp/client_proto.py 96.71% <ø> (ø)
tests/test_client_functional.py 98.29% <100.00%> (+0.09%) ⬆️

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 0215cdd...188852b. Read the comment docs.

@sriharry16
Copy link

This change would be available from which version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants