Commit 694cd07f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

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.
parent 5e71f293
......@@ -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";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment