mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't finish the loop if the headers length is too big
This commit is contained in:
parent
d79ff999ce
commit
ffecd64669
@ -81,6 +81,9 @@ class Message(object):
|
|||||||
while len(lines) and lines[0].startswith((" ", "\t")):
|
while len(lines) and lines[0].startswith((" ", "\t")):
|
||||||
curr = lines.pop(0)
|
curr = lines.pop(0)
|
||||||
header_length += len(curr)
|
header_length += len(curr)
|
||||||
|
if header_length > self.limit_request_field_size > 0:
|
||||||
|
raise LimitRequestHeaders("limit request headers "
|
||||||
|
+ "fields size")
|
||||||
value.append(curr)
|
value.append(curr)
|
||||||
value = ''.join(value).rstrip()
|
value = ''.join(value).rstrip()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user