-
-
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
Make LineTooLong exception more detailed about actual data size. #2857
Comments
I think this wouldn't harm. |
Agree |
I've just found another interesting issue with Py/C parsers: diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py
index 57232ad6..c17f3774 100644
--- a/tests/test_http_parser.py
+++ b/tests/test_http_parser.py
@@ -367,7 +367,7 @@ def test_max_header_field_size(parser):
def test_max_header_value_size(parser):
- name = b'test' * 10 * 1024
+ name = b'A' * 8190
text = (b'GET /test HTTP/1.1\r\n'
b'data:' + name + b'\r\n\r\n')
I would expect this test to fail for both parsers but it passes for HttpRequestParserPy
|
Should this be closed? #2863 is merged. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
Currently seeing such exceptions in logs doesn't help much in understanding how big the actual data was:
Although
HttpParser
has themax_field_size
argument allowing to control this limit it is betterto know how big received data is to increase this limit to some reasonable value.
So, I'd like to modify
LineTooLong
exception extending it with one more argumentactual_size
.@aio-libs/aiohttp-committers, thoughts?
The text was updated successfully, but these errors were encountered: