Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 7106:d77407baccd1
HTTP/2: added logging of 400 (Bad Request) reasons.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 14 Sep 2017 19:06:03 +0300 |
parents | 12cadc4669a7 |
children | 2bf605c6edf7 |
comparison
equal
deleted
inserted
replaced
7105:0846dd76a487 | 7106:d77407baccd1 |
---|---|
3335 | 3335 |
3336 if (r->method_name.len == 0 | 3336 if (r->method_name.len == 0 |
3337 || r->schema_start == NULL | 3337 || r->schema_start == NULL |
3338 || r->unparsed_uri.len == 0) | 3338 || r->unparsed_uri.len == 0) |
3339 { | 3339 { |
3340 if (r->method_name.len == 0) { | |
3341 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | |
3342 "client sent no :method header"); | |
3343 | |
3344 } else if (r->schema_start == NULL) { | |
3345 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | |
3346 "client sent no :schema header"); | |
3347 | |
3348 } else { | |
3349 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | |
3350 "client sent no :path header"); | |
3351 } | |
3352 | |
3340 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 3353 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); |
3341 return NGX_ERROR; | 3354 return NGX_ERROR; |
3342 } | 3355 } |
3343 | 3356 |
3344 r->request_line.len = r->method_name.len + 1 | 3357 r->request_line.len = r->method_name.len + 1 |