Skip to content

aiohttp increase max line and max field size of client session #211

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MangoPieface
Copy link

aiohttp uses the default values for max_line_size and max_field_size for ClientSession and the db_load fails if it goes above this value.

https://docs.aiohttp.org/en/stable/client_reference.html

max_line_size: Maximum allowed size of lines in responses.
max_field_size: Maximum allowed size of header fields in responses.

And example of this failing is this load of the RSS feed:

python -m tools.db_load https://www.bhf.org.uk/rss/news RSS

This PR both increases the size to 32KB for both header and field sizes and allows it to be injectable when the ClientSession is initalised.

… also allow these values to be injectable as constants
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.

1 participant