Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 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 | 7206c3630310 |
children | 12cadc4669a7 |
comparison
equal
deleted
inserted
replaced
7028:e6f399a176e7 | 7029:3c55863e6887 |
---|---|
3330 u_char *p; | 3330 u_char *p; |
3331 | 3331 |
3332 static const u_char ending[] = " HTTP/2.0"; | 3332 static const u_char ending[] = " HTTP/2.0"; |
3333 | 3333 |
3334 if (r->method_name.len == 0 | 3334 if (r->method_name.len == 0 |
3335 || r->schema_start == NULL | |
3335 || r->unparsed_uri.len == 0) | 3336 || r->unparsed_uri.len == 0) |
3336 { | 3337 { |
3337 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 3338 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); |
3338 return NGX_ERROR; | 3339 return NGX_ERROR; |
3339 } | 3340 } |