From 514a205b497bdc1901a09b1bc20075d4dc10f44a Mon Sep 17 00:00:00 2001 From: Jamie Matthews Date: Sun, 21 Jul 2019 16:50:39 +0100 Subject: [PATCH] Use raw response data to fix encoding issues --- router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router.py b/router.py index 6e04ce5..203f046 100644 --- a/router.py +++ b/router.py @@ -41,9 +41,10 @@ def proxy(path): headers=request.headers, data=request.get_data(), allow_redirects=False, + stream=True, ) return Response( - response=downstream_response.content, + response=downstream_response.raw.data, status=downstream_response.status_code, headers=downstream_response.raw.headers.items(), )