fix Connection broken: IncompleteRead
Andronaco Marco marco.andronaco@olivetti.com
Mon, 18 Dec 2023 15:37:06 +0100
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
fixyoutube/views.py
→
fixyoutube/views.py
@@ -47,5 +47,5 @@
if result is None: return abort(400) - req = get(result.url, headers=c.PROXY_HEADERS_REQUEST) - return Response(req.content, headers=c.PROXY_HEADERS_RESPONSE) + with get(result.url, headers=c.PROXY_HEADERS_REQUEST, stream=True) as r: + return Response(r.content, headers=c.PROXY_HEADERS_RESPONSE)