changeset 7029:3c55863e6887

HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author Piotr Sikora <piotrsikora@google.com>
date Tue, 13 Jun 2017 17:01:08 +0300
parents e6f399a176e7
children 4a343228c55e
files src/http/v2/ngx_http_v2.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -3332,6 +3332,7 @@ ngx_http_v2_construct_request_line(ngx_h
     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);