Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 7630:f001d9384293
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 28 Feb 2020 17:21:18 +0300 |
parents | 1055e43e4fab |
children | 7999d3fbb765 681b78a98a52 |
comparison
equal
deleted
inserted
replaced
7629:f47f7d3d1bfa | 7630:f001d9384293 |
---|---|
4685 if (overwrite == -1) { | 4685 if (overwrite == -1) { |
4686 switch (err->status) { | 4686 switch (err->status) { |
4687 case NGX_HTTP_TO_HTTPS: | 4687 case NGX_HTTP_TO_HTTPS: |
4688 case NGX_HTTPS_CERT_ERROR: | 4688 case NGX_HTTPS_CERT_ERROR: |
4689 case NGX_HTTPS_NO_CERT: | 4689 case NGX_HTTPS_NO_CERT: |
4690 case NGX_HTTP_REQUEST_HEADER_TOO_LARGE: | |
4690 err->overwrite = NGX_HTTP_BAD_REQUEST; | 4691 err->overwrite = NGX_HTTP_BAD_REQUEST; |
4691 } | 4692 } |
4692 } | 4693 } |
4693 | 4694 |
4694 err->value = cv; | 4695 err->value = cv; |