mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 04:12:40 +08:00
HTTP/2: added logging of 400 (Bad Request) reasons.
This commit is contained in:
parent
c36a3c0cba
commit
8f6c5306fb
@ -3337,6 +3337,19 @@ ngx_http_v2_construct_request_line(ngx_http_request_t *r)
|
|||||||
|| r->schema_start == NULL
|
|| r->schema_start == NULL
|
||||||
|| r->unparsed_uri.len == 0)
|
|| 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);
|
ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user