Strip whitespace on response headers (#706)

Strip leading/trailing whitespace on response headers.
Closes #664
This commit is contained in:
Tom Christie 2019-11-06 20:57:00 +00:00 committed by GitHub
parent d62b22e9fd
commit 3e9bcec368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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(