Welcome! Log In Create A New Profile

Advanced

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

All files from this thread

File Name File Size   Posted by Date  
patch.413 530 bytes open | download Igor Sysoev 09/01/2009 Read message
August 31, 2009 12:22PM
On Mon, Aug 31, 2009 at 03:38:44PM +0000, Peter Vandenberk wrote:

> pvdb writes:
> > I am dealing with the same requirement (implement a custom
> > 413 nginx error page) and am banging my head against the
> > wall for the same reason that Mike describes in his original post.
> >
> > Posted at Nginx Forum:
> > http://forum.nginx.org/read.php?2,2620,5422#msg-5422
>
> It appears that the cross-posting between the two mailing lists
> has truncated my original post...
>
> Here's a bit more context from Mike's original post:
>
> > The problem I'm having is I can't seem to set a custom error page for
> > HTTP 413 errors. If I issue a file upload to an nginx url and it
> > exceeds the maximum size set in my configuration, I want the custom
> > error page to show. Instead I get the nginx default.
> >
> > error_page 413 /err/413.html
> >
> > when I upload will give me something like this in my error log: ...
>
> Basically I'm having the same issue, and no matter how many different
> variations of my nginx.conf I try, I can not get it to serve my custom
> 413.html error page, but *always* serves the default nginx 413 one.
>
> Here's the relevant snippet from my nging.conf file:
>
> error_page 413 /413.html;
> location = /413.html {
> root /usr/local/nginx/html;
> }
>
> Any ideas? Many thanks in advance,

The attached patch should fix the bug.

However, browsers usually show the 413 error page only after they have sent
a whole request body. Therefore on slow connection and with large body
browsers will show some network error or "this page cannot be displayed" page.


--
Igor Sysoev
http://sysoev.ru/en/
Attachments:
open | download - patch.413 (530 bytes)
Subject Author Posted

Bug: custom error_page doesn't work for HTTP 413 (content too large)

Michael Nachbaur June 03, 2009 07:13PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

pvdb August 31, 2009 11:26AM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

pvdb August 31, 2009 11:38AM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large) Attachments

Igor Sysoev August 31, 2009 12:22PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

pvdb August 31, 2009 01:25PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

Igor Sysoev September 02, 2009 05:49PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

estebistec June 18, 2010 12:48PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

estebistec June 23, 2010 06:49PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

Maxim Dounin June 20, 2010 07:28PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

estebistec June 21, 2010 09:19AM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

Maxim Dounin June 21, 2010 12:24PM

Re: Bug: custom error_page doesn't work for HTTP 413 (content too large)

estebistec June 21, 2010 09:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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