]> git.kaiwu.me - nginx.git/commit
Improved logging of invalid headers.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 28 Jun 2021 15:01:20 +0000 (18:01 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 28 Jun 2021 15:01:20 +0000 (18:01 +0300)
commit7587778a33bea0ce6f203a8c4de18e33f38b9582
treea0d639abed07bc85bc99efb5609333494d9f496f
parent9ab4d368af63e9c4a0bebc0eda82d668adaa560a
Improved logging of invalid headers.

In 71edd9192f24 logging of invalid headers which were rejected with the
NGX_HTTP_PARSE_INVALID_HEADER error was restricted to just the "client
sent invalid header line" message, without any attempts to log the header
itself.

This patch returns logging of the header up to the invalid character and
the character itself.  The r->header_end pointer is now properly set
in all cases to make logging possible.

The same logging is also introduced when parsing headers from upstream
servers.
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_scgi_module.c
src/http/modules/ngx_http_uwsgi_module.c
src/http/ngx_http_parse.c
src/http/ngx_http_request.c