diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-03 11:22:07 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-11-03 11:22:07 +0300 |
commit | bbd05ae252bce1907173d13c6e48d1bed71cd9ea (patch) | |
tree | 6bca56a91f1d0a0b1c3ad4ac0d3c3ba2b4122468 /src/http/ngx_http_request.c | |
parent | 8f8cb92e9229d75ea5816f35c6b4bfdfb253a486 (diff) | |
parent | 3334585539168947650a37d74dd32973ab451d70 (diff) | |
download | nginx-bbd05ae252bce1907173d13c6e48d1bed71cd9ea.tar.gz nginx-bbd05ae252bce1907173d13c6e48d1bed71cd9ea.zip |
Merged with the default branch.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index e37ef8024..88516cb4d 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -617,7 +617,7 @@ ngx_http_alloc_request(ngx_connection_t *c) } #if (NGX_HTTP_SSL) - if (c->ssl) { + if (c->ssl && !c->ssl->sendfile) { r->main_filter_need_in_memory = 1; } #endif @@ -816,8 +816,7 @@ ngx_http_ssl_handshake_handler(ngx_connection_t *c) c->ssl->no_wait_shutdown = 1; #if (NGX_HTTP_V2 \ - && (defined TLSEXT_TYPE_application_layer_protocol_negotiation \ - || defined TLSEXT_TYPE_next_proto_neg)) + && defined TLSEXT_TYPE_application_layer_protocol_negotiation) { unsigned int len; const unsigned char *data; @@ -827,19 +826,8 @@ ngx_http_ssl_handshake_handler(ngx_connection_t *c) if (hc->addr_conf->http2) { -#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation SSL_get0_alpn_selected(c->ssl->connection, &data, &len); -#ifdef TLSEXT_TYPE_next_proto_neg - if (len == 0) { - SSL_get0_next_proto_negotiated(c->ssl->connection, &data, &len); - } -#endif - -#else /* TLSEXT_TYPE_next_proto_neg */ - SSL_get0_next_proto_negotiated(c->ssl->connection, &data, &len); -#endif - if (len == 2 && data[0] == 'h' && data[1] == '2') { ngx_http_v2_init(c->read); return; |