diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2017-09-14 19:06:03 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2017-09-14 19:06:03 +0300 |
| commit | 8f6c5306fb3c32147d0f5835206a8c6101247eec (patch) | |
| tree | f9430521fbea56eb4e6663c87fcee2c309769232 | |
| parent | c36a3c0cba7082f4b4933e90eef986e49e3eea98 (diff) | |
| download | nginx-8f6c5306fb3c32147d0f5835206a8c6101247eec.tar.gz nginx-8f6c5306fb3c32147d0f5835206a8c6101247eec.tar.bz2 | |
HTTP/2: added logging of 400 (Bad Request) reasons.
Diffstat (limited to '')
| -rw-r--r-- | src/http/v2/ngx_http_v2.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index d99dd8342..2d60f4936 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -3337,6 +3337,19 @@ ngx_http_v2_construct_request_line(ngx_http_request_t *r) || r->schema_start == NULL || r->unparsed_uri.len == 0) { + if (r->method_name.len == 0) { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client sent no :method header"); + + } else if (r->schema_start == NULL) { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client sent no :schema header"); + + } else { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client sent no :path header"); + } + ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); return NGX_ERROR; } |
