error code 494
Frank Liu
gfrankliu at gmail.com
Mon Feb 3 16:11:09 UTC 2020
Thanks for the reply!
My question is more about why there is inconsistent response code between using default error page and default error page.
> On Feb 3, 2020, at 5:20 AM, Francis Daly <francis at daoine.org> wrote:
>
> 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
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list