diff src/http/ngx_http_parse.c @ 8012:e334ca1b23ba quic

HTTP/3: support $server_protocol variable. Now it holds "HTTP/3.0". Previously it was empty.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 14 Jul 2020 16:52:44 +0300
parents d6feece1288a
children 9ffef6054abf
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -833,6 +833,10 @@ done:
         r->request_end = p;
     }
 
+    if (r->http_protocol.data) {
+        r->http_protocol.len = r->request_end - r->http_protocol.data;
+    }
+
     r->http_version = r->http_major * 1000 + r->http_minor;
     r->state = sw_start;