Hi All,

I've set a custom error page for the 413 error when the upload file
size exceeds the maximum set in apache LimitRequestBody directive (500
KB).
This is working fine for all files upto 3 MB. However when the size
exceeds this limit, the browser is showing the below message instead
of my custom error page. Can someone point me in the right direction?

Connection Interrupted

The connection to the server was reset while the page was
loading.

The network link was interrupted while negotiating a connection.
Please try again.


Thanks,
Vamsy

On Mar 15, 11:21 am, vamsy krishna <badguitar...@gmail.com> wrote:
> Thanks Tom. I also looked up the Django code and realised there is no
> handler413 defined. I'm now doing it in apache the way you mentioned.
>
> On Mar 14, 4:38 pm, Tom Evans <tevans...@googlemail.com> wrote:
>
> > On Mon, Mar 14, 2011 at 9:02 AM, vamsy krishna <badguitar...@gmail.com> 
> > wrote:
> > > I'm facing a new problem now. I have a defined a custom error page and
> > > using the handler413 in my urls file to load this template. However
> > > this is not getting picked up. I would like to handle this at django
> > > level instead of apache. The ErrorDocument definition in apache works
> > > fine.
>
> > > Also the handler404 and handler500 are working without any issue. Can
> > > someone point me in the right direction?
>
> > > Thanks,
> > > Vamsy
>
> > handler404 and handler500 get called if django tries to serve a page
> > that doesn't exist or a page that errors. Your 413 is generated from
> > apache, and so does not ever call django, therefore django cannot
> > handle this error.
>
> > To get around this, set
>
> > ErrorHandler 413 /some/django/url
>
> > Apache will use an internal redirect to fetch this URL, so it should
> > be transparent to your users.
>
> > Cheers
>
> > Tom
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to