mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
run-dev: Discard Transfer-Encoding header from upstream response.
When the upstream provides a chunked response, proxying this header causes a protocol-level miscommunication. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
d840d80ed4
commit
2fe1ece3a6
@@ -261,6 +261,7 @@ class BaseHandler(web.RequestHandler):
|
||||
|
||||
for header, v in response.headers.get_all():
|
||||
# some header appear multiple times, eg 'Set-Cookie'
|
||||
if header.lower() != "transfer-encoding":
|
||||
self.add_header(header, v)
|
||||
if response.body:
|
||||
self.write(response.body)
|
||||
|
||||
Reference in New Issue
Block a user