error code 494
Francis Daly
francis at daoine.org
Mon Feb 3 13:20:15 UTC 2020
On Sun, Feb 02, 2020 at 11:09:14PM -0800, Frank Liu wrote:
Hi there,
> When I send a request with too longer header value to nginx 1.16.1, I get
> 400 Bad Request response code and default nginx error page.
> If I create a custom error page:
> error_page 494 /my4xx.html;
> now I can see my error page but the http response code becomes 494. Is that
> a bug?
I don't know whether "error_page keeps 494 as 494 instead of
auto-converting to 400" is a bug or not. (I can imagine "yes" and "no"
both being justifiable answers.)
But if you *want* 400, you can do
error_page 494 =400 /my4xx.html;
or, possibly for the specific case of 494,
error_page 494 =431 /my4xx.html;
Hope this helps,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list