From 70ef3c357cbd2b37113cdbc0340971a8007ea2d0 Mon Sep 17 00:00:00 2001 From: redshift <213178690+1ftredsh@users.noreply.github.com> Date: Mon, 18 May 2026 22:08:29 +0800 Subject: [PATCH] fixed the encoding bug. --- routstr/upstream/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routstr/upstream/base.py b/routstr/upstream/base.py index 11a8a902..02f107e2 100644 --- a/routstr/upstream/base.py +++ b/routstr/upstream/base.py @@ -2818,10 +2818,13 @@ class BaseUpstreamProvider: await response.aclose() return mapped + response_headers = dict(response.headers) + response_headers.pop("content-encoding", None) + response_headers.pop("content-length", None) return StreamingResponse( response.aiter_bytes(), status_code=response.status_code, - headers=dict(response.headers), + headers=response_headers, ) except Exception as exc: tb = traceback.format_exc()