Custom page for 400 (Bad Request)
nginx-forum at nginx.us
Tue Dec 14 20:33:02 MSK 2010
This should be added to default server, as error 400 is generated
before any server_name matching occurs.
Yep, I added it to the default server. At least, it's listening as
listen 80 default;
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).
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
But the problem is, I either get that hardcoded simple page or get http
response with no response body at all.
$ curl http://foobar.com/ -b hugecookies.jar
HTTP/1.1 400 Bad Request
Date: Tue, 14 Dec 2010 17:29:07 GMT
Content-Type: text/html; charset=EUC-JP
curl: (55) Send failure: Connection reset by peer
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,158557,158603#msg-158603
More information about the nginx