]> git.kaiwu.me - nginx.git/commitdiff
QUIC: modified HTTP version test.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 12 Jan 2022 08:54:39 +0000 (11:54 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 12 Jan 2022 08:54:39 +0000 (11:54 +0300)
The new condition produces smaller diff to the default branch and is similar to
HTTP/2 case.

src/http/ngx_http_request_body.c

index d2bec78204f17e899ffec726a174ccc1baf8f25c..afb0423955606a20505ca1c5ad5630927e8bf9c5 100644 (file)
@@ -942,7 +942,14 @@ ngx_http_test_expect(ngx_http_request_t *r)
 
     if (r->expect_tested
         || r->headers_in.expect == NULL
-        || r->http_version != NGX_HTTP_VERSION_11)
+        || r->http_version < NGX_HTTP_VERSION_11
+#if (NGX_HTTP_V2)
+        || r->stream != NULL
+#endif
+#if (NGX_HTTP_V3)
+        || r->connection->quic != NULL
+#endif
+       )
     {
         return NGX_OK;
     }