mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Implement check and exception for str type on value in Response process_headers method.
This commit is contained in:
parent
54c820feb3
commit
ad6ed3f4c8
@ -253,7 +253,8 @@ class Response(object):
|
||||
if HEADER_RE.search(name):
|
||||
raise InvalidHeaderName('%r' % name)
|
||||
|
||||
value = str(value)
|
||||
if not isinstance(value, str):
|
||||
raise TypeError('%r is not a string' % value)
|
||||
|
||||
if HEADER_VALUE_RE.search(value):
|
||||
raise InvalidHeader('%r' % value)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user