diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2020-02-28 17:21:18 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2020-02-28 17:21:18 +0300 |
commit | 6ba18bc35ee1bdf95130ee653adf451928ae8b74 (patch) | |
tree | 1d9506ada08cd086c75fd84ab680d1a90f37f675 /src/http/ngx_http_core_module.c | |
parent | ba27037a498ed3839648d7a4097b01ed14949f18 (diff) | |
download | nginx-6ba18bc35ee1bdf95130ee653adf451928ae8b74.tar.gz nginx-6ba18bc35ee1bdf95130ee653adf451928ae8b74.zip |
Added default overwrite in error_page 494.
We used to have default error_page overwrite for 495, 496, and 497, so
a configuration like
error_page 495 /error;
will result in error 400, much like without any error_page configured.
The 494 status code was introduced later (in 3848:de59ad6bf557, nginx 0.9.4),
and relevant changes to ngx_http_core_error_page() were missed, resulting
in inconsistent behaviour of "error_page 494" - with error_page configured
it results in 494 being returned instead of 400.
Reported by Frank Liu,
http://mailman.nginx.org/pipermail/nginx/2020-February/058957.html.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index da23af1fb..4867bed2b 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -4687,6 +4687,7 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) case NGX_HTTP_TO_HTTPS: case NGX_HTTPS_CERT_ERROR: case NGX_HTTPS_NO_CERT: + case NGX_HTTP_REQUEST_HEADER_TOO_LARGE: err->overwrite = NGX_HTTP_BAD_REQUEST; } } |