]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header.
authorPiotr Sikora <piotrsikora@google.com>
Tue, 13 Jun 2017 14:01:08 +0000 (17:01 +0300)
committerPiotr Sikora <piotrsikora@google.com>
Tue, 13 Jun 2017 14:01:08 +0000 (17:01 +0300)
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
src/http/v2/ngx_http_v2.c

index 8e1b7aed4b75deb6ddf8d1d108e48c5c962eda52..772561640fb898918de145b3558eae5ba884c587 100644 (file)
@@ -3332,6 +3332,7 @@ ngx_http_v2_construct_request_line(ngx_http_request_t *r)
     static const u_char ending[] = " HTTP/2.0";
 
     if (r->method_name.len == 0
+        || r->schema_start == NULL
         || r->unparsed_uri.len == 0)
     {
         ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);