]> git.kaiwu.me - nginx.git/commit
Upstream: fixed handling of Status headers without reason-phrase.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 31 Aug 2023 19:59:17 +0000 (22:59 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 31 Aug 2023 19:59:17 +0000 (22:59 +0300)
commitfa46a5719924a5a4c48c515a903e0c46a4d98bcf
treeef1c58e98843913554aaf867e1be2bd6217120fb
parentba30ff4c8de1ac8c79a12da50ef94e5d9f99fa66
Upstream: fixed handling of Status headers without reason-phrase.

Status header with an empty reason-phrase, such as "Status: 404 ", is
valid per CGI specification, but looses the trailing space during parsing.
Currently, this results in "HTTP/1.1 404" HTTP status line in the response,
which violates HTTP specification due to missing trailing space.

With this change, only the status code is used from such short Status
header lines, so nginx will generate status line itself, with the space
and appropriate reason phrase if available.

Reported at:
https://mailman.nginx.org/pipermail/nginx/2023-August/EX7G4JUUHJWJE5UOAZMO5UD6OJILCYGX.html
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_scgi_module.c
src/http/modules/ngx_http_uwsgi_module.c