From: Ben Darnell Date: Thu, 30 Jul 2015 02:53:33 +0000 (-0400) Subject: Remove arbitrary cap on length of outgoing headers. X-Git-Tag: v4.3.0b1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95c4dce40f089b8160d60af58383b32bf67275a0;p=thirdparty%2Ftornado.git Remove arbitrary cap on length of outgoing headers. The cap is too low for some uses, and it's unclear if it's worth keeping. Closes #1473. Closes #1025. --- diff --git a/tornado/web.py b/tornado/web.py index 4ff75771b..f237d78f0 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -362,10 +362,8 @@ class RequestHandler(object): else: raise TypeError("Unsupported header value %r" % value) # If \n is allowed into the header, it is possible to inject - # additional headers or split the request. Also cap length to - # prevent obviously erroneous values. - if (len(value) > 4000 or - RequestHandler._INVALID_HEADER_CHAR_RE.search(value)): + # additional headers or split the request. + if RequestHandler._INVALID_HEADER_CHAR_RE.search(value): raise ValueError("Unsafe header value %r", value) return value