mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Disallow empty header names.
This commit is contained in:
parent
2dbe49de99
commit
735e9e867a
@ -83,7 +83,7 @@ class Message(object):
|
|||||||
# Parse initial header name : value pair.
|
# Parse initial header name : value pair.
|
||||||
curr = lines.pop(0)
|
curr = lines.pop(0)
|
||||||
header_length = len(curr)
|
header_length = len(curr)
|
||||||
if curr.find(":") < 0:
|
if curr.find(":") <= 0:
|
||||||
raise InvalidHeader(curr.strip())
|
raise InvalidHeader(curr.strip())
|
||||||
name, value = curr.split(":", 1)
|
name, value = curr.split(":", 1)
|
||||||
if self.cfg.strip_header_spaces:
|
if self.cfg.strip_header_spaces:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user