[nginx] HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header.

Valentin Bartenev vbart at nginx.com
Tue Jun 13 14:03:19 UTC 2017


details:   http://hg.nginx.org/nginx/rev/3c55863e6887
branches:  
changeset: 7029:3c55863e6887
user:      Piotr Sikora <piotrsikora at google.com>
date:      Tue Jun 13 17:01:08 2017 +0300
description:
HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header.

Signed-off-by: Piotr Sikora <piotrsikora at google.com>

diffstat:

 src/http/v2/ngx_http_v2.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r e6f399a176e7 -r 3c55863e6887 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c	Wed Jun 07 18:46:36 2017 +0300
+++ b/src/http/v2/ngx_http_v2.c	Tue Jun 13 17:01:08 2017 +0300
@@ -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);


More information about the nginx-devel mailing list