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:
Tatsuhiro Tsujikawa 2014-05-15 23:45:17 +09:00
parent 5e71f293e5
commit 694cd07f1d
1 changed files with 2 additions and 1 deletions

View File

@ -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";
}