Allow configuration of header size limits#912
Merged
asvetlov merged 2 commits intoaio-libs:masterfrom Jul 12, 2016
Merged
Conversation
Member
|
Please respect pep8: aiohttp/helpers.py:336:80: E501 line too long (92 > 79 characters) ;) |
Users can specify `max_headers`, `max_line_size`, and `max_field_size` via `app.make_handler()`. Fixes aio-libs#909.
Contributor
Author
|
Oops, fixed
Dustin
|
| self._timeout = timeout # slow request timeout | ||
| self._loop = loop if loop is not None else asyncio.get_event_loop() | ||
|
|
||
| parser_kwargs = {} |
Member
There was a problem hiding this comment.
These lines look like python2-ish.
Is there any reason to don't use keyword-only constructor parameters with reasonable default values?
Contributor
Author
There was a problem hiding this comment.
I wanted to avoid giving default values for those parameters away from the
place where the parameters are used. That is, if I was looking for the
default value of max_headers, I would go looking in the parser class, not
here. Is there a more py3-ish way to accomplish that?
|
What is the right way to set this using an application runner? I googled and read and googled and read.. If not possible via runner then what is the correct modern way? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry this took me so long ;)