summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Sikora <piotrsikora@google.com>2017-06-13 17:01:08 +0300
committerPiotr Sikora <piotrsikora@google.com>2017-06-13 17:01:08 +0300
commit13f49b0013d7a01421925ba7e86624eae8fcf2e7 (patch)
tree4603585baac5fb1a790d42e3070352cf6b444b61
parentaa04b091aecd11e97563f4835fc3b4a353deedf8 (diff)
downloadnginx-13f49b0013d7a01421925ba7e86624eae8fcf2e7.tar.gz
HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
-rw-r--r--src/http/v2/ngx_http_v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 8e1b7aed4..772561640 100644
--- 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_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);