Welcome! Log In Create A New Profile

Advanced

[nginx] Added default overwrite in error_page 494.

Maxim Dounin
February 28, 2020 09:22AM
details: https://hg.nginx.org/nginx/rev/f001d9384293
branches:
changeset: 7630:f001d9384293
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Feb 28 17:21:18 2020 +0300
description:
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:

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

diffs (11 lines):

diff -r f47f7d3d1bfa -r f001d9384293 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Wed Feb 26 15:10:46 2020 +0300
+++ b/src/http/ngx_http_core_module.c Fri Feb 28 17:21:18 2020 +0300
@@ -4687,6 +4687,7 @@ ngx_http_core_error_page(ngx_conf_t *cf,
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;
}
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Added default overwrite in error_page 494.

Maxim Dounin 378 February 28, 2020 09:22AM



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

Online Users

Guests: 280
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