mirror of https://github.com/encode/starlette.git
Strip whitespace on response headers (#706)
Strip leading/trailing whitespace on response headers. Closes #664
This commit is contained in:
parent
d62b22e9fd
commit
3e9bcec368
|
@ -120,7 +120,7 @@ class WSGIResponder:
|
|||
status_code_string, _ = status.split(" ", 1)
|
||||
status_code = int(status_code_string)
|
||||
headers = [
|
||||
(name.encode("ascii"), value.encode("ascii"))
|
||||
(name.strip().encode("ascii"), value.strip().encode("ascii"))
|
||||
for name, value in response_headers
|
||||
]
|
||||
self.send_queue.append(
|
||||
|
|
Loading…
Reference in New Issue