Welcome! Log In Create A New Profile

Advanced

Re: Custom page for 400 (Bad Request)

December 14, 2010 12:33PM
[quote]
This should be added to default server, as error 400 is generated
before any server_name matching occurs.
[/quote]

Yep, I added it to the default server. At least, it's listening as
[code]
listen 80 default;
[/code]

[quote]
Note that you may also bump client_header_buffer_size /
large_client_header_buffers if you want cookies in question to be
actually accepted and processed (this should be done in default
server, too, or at http level).
[/quote]
That's exactly what I'm bumping. Sorry, I should have made it more clear in my first post. I don't want to make my large_client_header_buffer 1 megabyte and I need some kind of way to fall back gracefully when a client appears with 1Mbyte cookie. Like show him a page saying "your cookie is too large, please delete it" or delete it in javascript.
But the problem is, I either get that hardcoded simple page or get http response with no response body at all.
[code]
$ curl http://foobar.com/ -b hugecookies.jar
HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 14 Dec 2010 17:29:07 GMT
Content-Type: text/html; charset=EUC-JP
Content-Length: 237
Connection: close

curl: (55) Send failure: Connection reset by peer
$
[/code]
Subject Author Posted

Custom page for 400 (Bad Request)

Denis December 14, 2010 10:16AM

Re: Custom page for 400 (Bad Request)

Maxim Dounin December 14, 2010 12:16PM

Re: Custom page for 400 (Bad Request)

Denis December 14, 2010 12:33PM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 14, 2010 05:40PM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 14, 2010 05:44PM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 14, 2010 06:38PM

Re: Custom page for 400 (Bad Request)

Eugaia December 15, 2010 06:28AM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 15, 2010 06:40AM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 15, 2010 06:44AM

Re: Custom page for 400 (Bad Request)

Eugaia December 15, 2010 06:46AM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 15, 2010 06:54AM

Re: Custom page for 400 (Bad Request)

Eugaia December 15, 2010 07:02AM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 15, 2010 07:12AM

Re: Custom page for 400 (Bad Request)

Igor Sysoev December 15, 2010 08:44AM

Re: Custom page for 400 (Bad Request)

Denis December 15, 2010 04:44AM



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: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready