This commit is contained in:
Roger Chen 2026-03-31 23:58:00 -04:00 committed by GitHub
commit 75225a93d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -1196,6 +1196,10 @@ server_http_proxy::server_http_proxy(
// disable Accept-Encoding to avoid compressed responses
continue;
}
if (key == "Transfer-Encoding") {
// the body is already decoded
continue;
}
if (key == "Host" || key == "host") {
bool is_default_port = (scheme == "https" && port == 443) || (scheme == "http" && port == 80);
req.set_header(key, is_default_port ? host : host + ":" + std::to_string(port));