Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: added logging of 400 (Bad Request) reasons.

Maxim Dounin
September 14, 2017 01:18PM
details: http://hg.nginx.org/nginx/rev/d77407baccd1
branches:
changeset: 7106:d77407baccd1
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Sep 14 19:06:03 2017 +0300
description:
HTTP/2: added logging of 400 (Bad Request) reasons.

diffstat:

src/http/v2/ngx_http_v2.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diffs (23 lines):

diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
--- 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_h
|| 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;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: added logging of 400 (Bad Request) reasons.

Maxim Dounin 314 September 14, 2017 01:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 87
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready