As per RFC 2817 Section 5.2:
Like any other pipelined HTTP/1.1 request, data to be tunneled may be
sent immediately after the blank line. The usual caveats also apply:
data may be discarded if the eventual response is negative, and the
connection may be reset with no response if more than one TCP segment
is outstanding.
r->connection->log->action = NULL;
if (!r->internal) {
- switch (r->headers_in.connection_type) {
- case 0:
- r->keepalive = (r->http_version > NGX_HTTP_VERSION_10);
- break;
- case NGX_HTTP_CONNECTION_CLOSE:
- r->keepalive = 0;
- break;
+ if (r->method != NGX_HTTP_CONNECT) {
+ switch (r->headers_in.connection_type) {
+ case 0:
+ r->keepalive = (r->http_version > NGX_HTTP_VERSION_10);
+ break;
- case NGX_HTTP_CONNECTION_KEEP_ALIVE:
- r->keepalive = 1;
- break;
+ case NGX_HTTP_CONNECTION_CLOSE:
+ r->keepalive = 0;
+ break;
+
+ case NGX_HTTP_CONNECTION_KEEP_ALIVE:
+ r->keepalive = 1;
+ break;
+ }
}
r->lingering_close = (r->headers_in.content_length_n > 0