Skip to content

Commit

Permalink
Merge pull request dabapps#44 from dabapps/remove-transfer-encoding-h…
Browse files Browse the repository at this point in the history
…eader

Remove the transfer-encoding header if present
  • Loading branch information
j4mie authored May 11, 2020
2 parents 60e262c + 6ecff63 commit 5508ce9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crab/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def proxy(path):
allow_redirects=False,
stream=True,
)

# We need to remove the transfer-encoding header as this will
# no longer apply to the response we are about to send
downstream_response.raw.headers.pop("transfer-encoding", None)

return Response(
response=downstream_response.raw.data,
status=downstream_response.status_code,
Expand Down

0 comments on commit 5508ce9

Please sign in to comment.