Skip to content

Commit

Permalink
HTTP/2: reject HTTP/2 requests without ":scheme" pseudo-header.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Jun 13, 2017
1 parent aa04b09 commit 13f49b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/http/v2/ngx_http_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 13f49b0

Please sign in to comment.