Skip to content

Commit d6dac92

Browse files
authored
Ignore Transfer-Encoding header. (ggml-org#20269)
1 parent dae2bf4 commit d6dac92

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/server/server-models.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,10 @@ server_http_proxy::server_http_proxy(
11961196
// disable Accept-Encoding to avoid compressed responses
11971197
continue;
11981198
}
1199+
if (key == "Transfer-Encoding") {
1200+
// the body is already decoded
1201+
continue;
1202+
}
11991203
if (key == "Host" || key == "host") {
12001204
bool is_default_port = (scheme == "https" && port == 443) || (scheme == "http" && port == 80);
12011205
req.set_header(key, is_default_port ? host : host + ":" + std::to_string(port));

0 commit comments

Comments
 (0)