mirror of
https://github.com/nghttp2/nghttp2.git
synced 2026-03-25 07:26:14 +08:00
nghttpx: Remove Connection: close header field from CONNECT response
It appears that some Android client does not like Connection: close in 200 CONNECT response. Browsers fine with this header field. It is better to remove it. Squid does not emit it too.
This commit is contained in:
@@ -676,7 +676,8 @@ int HttpsUpstream::on_downstream_header_complete(Downstream *downstream)
|
||||
// We add this header for HTTP/1.0 or HTTP/0.9 clients
|
||||
hdrs += "Connection: Keep-Alive\r\n";
|
||||
}
|
||||
} else {
|
||||
} else if(!downstream->get_upgraded() ||
|
||||
downstream->get_request_method() != "CONNECT") {
|
||||
hdrs += "Connection: close\r\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user