Welcome! Log In Create A New Profile

Advanced

Re: error code 494

Frank Liu
February 03, 2020 11:12AM
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@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@daoine.org
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

error code 494

Frank Liu February 03, 2020 02:10AM

Re: error code 494

Francis Daly February 03, 2020 08:22AM

Re: error code 494

Frank Liu February 03, 2020 11:12AM

Re: error code 494

Maxim Dounin February 03, 2020 11:48AM

Re: error code 494

Frank Liu February 04, 2020 01:04PM

Re: error code 494

Maxim Dounin February 05, 2020 07:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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