-
-
Save alexandru/f68bc29aac2e4961f7720ecfba63afd3 to your computer and use it in GitHub Desktop.
This file contains 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
from aiohttp import http | |
from aiohttp import http_parser | |
from aiohttp.http_parser import HttpResponseParser, HttpRequestParser | |
from aiohttp import client_proto | |
HttpResponseParserOrig = HttpResponseParser | |
HttpRequestParserOrig = HttpRequestParser | |
class HttpResponseParser(HttpResponseParserOrig): | |
def __init__(self, *args, **kwargs): | |
kwargs['max_line_size'] = 20000 | |
kwargs['max_field_size'] = 20000 | |
super(HttpResponseParser, self).__init__(*args, **kwargs) | |
class HttpRequestParser(HttpRequestParserOrig): | |
def __init__(self, *args, **kwargs): | |
kwargs['max_line_size'] = 20000 | |
kwargs['max_field_size'] = 20000 | |
super(HttpRequestParser, self).__init__(*args, **kwargs) | |
http.HttpRequestParser = HttpRequestParser | |
http_parser.HttpRequestParser = HttpRequestParser | |
client_proto.HttpRequestParser = HttpRequestParser | |
http.HttpResponseParser = HttpResponseParser | |
http_parser.HttpResponseParser = HttpResponseParser | |
client_proto.HttpResponseParser = HttpResponseParser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment