Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 8461:b3c07aa021f6 quic
HTTP/3: set r->headers_in.chunked flag after parsing headers.
Previously it was set when creating the request object. The side-effect was
trying to discard the request body in case of header parse error.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 30 Jun 2020 15:32:09 +0300 |
parents | 72f9ff4e0a88 |
children | 0d2b2664b41c |
comparison
equal
deleted
inserted
replaced
8460:72f9ff4e0a88 | 8461:b3c07aa021f6 |
---|---|
725 r->http_version = NGX_HTTP_VERSION_10; | 725 r->http_version = NGX_HTTP_VERSION_10; |
726 | 726 |
727 #if (NGX_HTTP_V3) | 727 #if (NGX_HTTP_V3) |
728 if (hc->quic) { | 728 if (hc->quic) { |
729 r->http_version = NGX_HTTP_VERSION_30; | 729 r->http_version = NGX_HTTP_VERSION_30; |
730 r->headers_in.chunked = 1; | |
731 } | 730 } |
732 #endif | 731 #endif |
733 | 732 |
734 r->headers_in.content_length_n = -1; | 733 r->headers_in.content_length_n = -1; |
735 r->headers_in.keep_alive_n = -1; | 734 r->headers_in.keep_alive_n = -1; |
2153 ngx_http_finalize_request(r, NGX_HTTP_NOT_IMPLEMENTED); | 2152 ngx_http_finalize_request(r, NGX_HTTP_NOT_IMPLEMENTED); |
2154 return NGX_ERROR; | 2153 return NGX_ERROR; |
2155 } | 2154 } |
2156 } | 2155 } |
2157 | 2156 |
2157 #if (NGX_HTTP_V3) | |
2158 if (r->http_version == NGX_HTTP_VERSION_30) { | |
2159 r->headers_in.chunked = 1; | |
2160 } | |
2161 #endif | |
2162 | |
2158 if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) { | 2163 if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) { |
2159 if (r->headers_in.keep_alive) { | 2164 if (r->headers_in.keep_alive) { |
2160 r->headers_in.keep_alive_n = | 2165 r->headers_in.keep_alive_n = |
2161 ngx_atotm(r->headers_in.keep_alive->value.data, | 2166 ngx_atotm(r->headers_in.keep_alive->value.data, |
2162 r->headers_in.keep_alive->value.len); | 2167 r->headers_in.keep_alive->value.len); |