You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ra...@seagate.com on 2008/03/01 03:03:56 UTC

[users@httpd] ErrorDocument not working for HTTP code 413

I am using httpd 2.2.4 with BEA Weblogic plug-in for Apache.
I have configured the ErrorDocument to handle HTTP return codes returned by
the app. I have set a MaxPostSize attribute on the WLS plug-in to limit the
file uploads.
When i simulate HTTP status 413 for large file uploads by doing a
multi/form-data post in my browser, though the plug-in/httpd seem to be
returning a HTTP code 413  as is seen in the access log, the ErrorDocument
that i have configured to handle this does not seem to kick in.
The ErrorDocument does work for other configured error codes which means my
webserver configuration is right.

Under what circumstances would  Apache httpd  not redirect the browser to
the page specified by ErrorDocument?

The entry in the access log appears as:

 "POST
/xfer/xfer/Rendezvous/?cm=uf&id=c6ef4300-8675-4c00-b403-71e93284c845&sd=b36cd054c9b151be8d8b5a2b76215924&p=1&rp=&rpo=0&pg=1
 HTTP/1.1"
 413 277 "http://ra-dev.test.com/falcon/addFiles.jsp?p=1&rp=&rpo=0&pg=1"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
Gecko/20080201 Firefox/2.0.0.12"

Thanks

Ramdas


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ErrorDocument not working for HTTP code 413

Posted by Nils Jeppe <ni...@pandemonium.de>.

On Fri, 29 Feb 2008 Ramdas.Hegde@seagate.com wrote:

> I am using httpd 2.2.4 with BEA Weblogic plug-in for Apache.
> I have configured the ErrorDocument to handle HTTP return codes returned by
> the app. I have set a MaxPostSize attribute on the WLS plug-in to limit the
> file uploads.
> When i simulate HTTP status 413 for large file uploads by doing a
> multi/form-data post in my browser, though the plug-in/httpd seem to be
> returning a HTTP code 413  as is seen in the access log, the ErrorDocument
> that i have configured to handle this does not seem to kick in.
> The ErrorDocument does work for other configured error codes which means my
> webserver configuration is right.

Does it work for other error codes returned by Bea, or did you test them 
"outside" the Weblogic application's mountpoint? I ask because we have a 
similar setup (with Apache 2.0.x) and during my trials, no return code 
returned from Bea whatsoever triggered the custom ErrorDocuments but it 
worked fine for all other situations.

I found a workaround, but it was not specific to any particular return 
code, and it is *quite* horrible, so I am interested to learn if your 
versions of Apache + Bea-Plugin are better behaved.

(The workaround was to put a reverseproxy in front of the main 
virtualhost, and activate ProxyErrorOverride for it so the reverse proxy 
can serve the custom error documents instead. It works, but... it's not a 
solution I am overly happy with.)

We did submit this as an issue to Bea, but unfortunately I never received 
any follow up information after they accepted the problem report. If it 
was indeed a bug with their plugin, and you use a very current version, 
they may have (more or less) fixed it.



Best wishes,
- Nils

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ErrorDocument not working for HTTP code 413

Posted by Eric Covener <co...@gmail.com>.
On Fri, Feb 29, 2008 at 10:06 PM, Joshua Slive <jo...@slive.ca> wrote:
>  See the paragraph near the bottom of
>  http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

In some cases, a string literal or external redirect can be used when
a local file form of ErrorDocument is unusable.

I believe ErrorDocument 413 /413.html triggers a recursive failure
because the C-L hangs around.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] ErrorDocument not working for HTTP code 413

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, Mar 3, 2008 at 3:44 PM,  <Ra...@seagate.com> wrote:
 > Joshua,
 >
 >
 >  > Is the 413 returned because you exceed the LimitRequestSize configured
 >  > for apache?
 >  >
 >
 >  I am not using the Apache parameter but a WLS plugin parameter.
 >  I have set the MaxPostSize parameter within the WLS Apache plugin. I am
 >  assuming this causes the 413 to return.

 Well, that's a different story. Apache uses ErrorDocument only when it
 generates the error message itself. It will not override
 application-specific error messages (since this would often result in
 less-useful error messages). The one exception, as Nils points out, is
 that Apache can be configured to override back-end errors when using
 mod_proxy. Your plugin probably doesn't provide that capability.


 >  But if i attempt to upload a much larger file, say 600MB, i get a different
 >  response in the browser:
 >
 >  The connection was reset

 That's an entirely different story again. Something along the way is
 yanking out the network connection.

 Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ErrorDocument not working for HTTP code 413

Posted by Ra...@seagate.com.
Joshua,

> Is the 413 returned because you exceed the LimitRequestSize configured
> for apache?
>

I am not using the Apache parameter but a WLS plugin parameter.
I have set the MaxPostSize parameter within the WLS Apache plugin. I am
assuming this causes the 413 to return.
Interestingly, i saw different behaviours with different file sizes.
I have the limit set at 10k.  When i attempt to upload a 15k file, i see
the following error returned to the browser:

Failure of server APACHE bridge:


Your file size is too large to upload.
Build date/time: Dec 13 2006 10:09:29


Change Number: 871803








But if i attempt to upload a much larger file, say 600MB, i get a different
response in the browser:

The connection was reset

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

    *   The site could be temporarily unavailable or too busy. Try again in
a few
          moments.

    *   If you are unable to load any pages, check your computer's network
          connection.

    *   If your computer or network is protected by a firewall or proxy,
make sure
          that Firefox is permitted to access the Web.



Thanks


Ramdas

> If so, this may be one of those errors that deliberately doesn't
> invoke custom ErrorDocuments. In the case of errors that may be
> resource-exhausting attacks by clients, apache short-circuits the
> normal error handling and returns a hard-coded message. This is
> because it is considered unsafe to go forward with full request
> processing when the server may be in a bad state due to resource
> exhaustion.
>
> I'd have to check the code to see if this explains your particular case.
>
> See the paragraph near the bottom of
> http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
>
> Joshua.






jslive@gmail.com wrote on 02/29/2008 07:06:49 PM:

> On Fri, Feb 29, 2008 at 9:03 PM,  <Ra...@seagate.com> wrote:
> >
> >  I am using httpd 2.2.4 with BEA Weblogic plug-in for Apache.
> >  I have configured the ErrorDocument to handle HTTP return codes
returned by
> >  the app. I have set a MaxPostSize attribute on the WLS plug-in tolimit
the
> >  file uploads.
> >  When i simulate HTTP status 413 for large file uploads by doing a
> >  multi/form-data post in my browser, though the plug-in/httpd seem to
be
> >  returning a HTTP code 413  as is seen in the access log, the
ErrorDocument
> >  that i have configured to handle this does not seem to kick in.
> >  The ErrorDocument does work for other configured error codes which
means my
> >  webserver configuration is right.
> >
> >  Under what circumstances would  Apache httpd  not redirect the browser
to
> >  the page specified by ErrorDocument?
> >
> >  The entry in the access log appears as:
> >
> >   "POST
> >  /xfer/xfer/Rendezvous/?cm=uf&id=c6ef4300-8675-4c00-
> b403-71e93284c845&sd=b36cd054c9b151be8d8b5a2b76215924&p=1&rp=&rpo=0&pg=1
> >   HTTP/1.1"
> >   413 277
"http://ra-dev.test.com/falcon/addFiles.jsp?p=1&rp=&rpo=0&pg=1"
> >  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
> >  Gecko/20080201 Firefox/2.0.0.12"
>
> Is the 413 returned because you exceed the LimitRequestSize configured
> for apache?
>
> If so, this may be one of those errors that deliberately doesn't
> invoke custom ErrorDocuments. In the case of errors that may be
> resource-exhausting attacks by clients, apache short-circuits the
> normal error handling and returns a hard-coded message. This is
> because it is considered unsafe to go forward with full request
> processing when the server may be in a bad state due to resource
> exhaustion.
>
> I'd have to check the code to see if this explains your particular case.
>
> See the paragraph near the bottom of
> http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ErrorDocument not working for HTTP code 413

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, Feb 29, 2008 at 9:03 PM,  <Ra...@seagate.com> wrote:
>
>  I am using httpd 2.2.4 with BEA Weblogic plug-in for Apache.
>  I have configured the ErrorDocument to handle HTTP return codes returned by
>  the app. I have set a MaxPostSize attribute on the WLS plug-in to limit the
>  file uploads.
>  When i simulate HTTP status 413 for large file uploads by doing a
>  multi/form-data post in my browser, though the plug-in/httpd seem to be
>  returning a HTTP code 413  as is seen in the access log, the ErrorDocument
>  that i have configured to handle this does not seem to kick in.
>  The ErrorDocument does work for other configured error codes which means my
>  webserver configuration is right.
>
>  Under what circumstances would  Apache httpd  not redirect the browser to
>  the page specified by ErrorDocument?
>
>  The entry in the access log appears as:
>
>   "POST
>  /xfer/xfer/Rendezvous/?cm=uf&id=c6ef4300-8675-4c00-b403-71e93284c845&sd=b36cd054c9b151be8d8b5a2b76215924&p=1&rp=&rpo=0&pg=1
>   HTTP/1.1"
>   413 277 "http://ra-dev.test.com/falcon/addFiles.jsp?p=1&rp=&rpo=0&pg=1"
>  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
>  Gecko/20080201 Firefox/2.0.0.12"

Is the 413 returned because you exceed the LimitRequestSize configured
for apache?

If so, this may be one of those errors that deliberately doesn't
invoke custom ErrorDocuments. In the case of errors that may be
resource-exhausting attacks by clients, apache short-circuits the
normal error handling and returns a hard-coded message. This is
because it is considered unsafe to go forward with full request
processing when the server may be in a bad state due to resource
exhaustion.

I'd have to check the code to see if this explains your particular case.

See the paragraph near the bottom of
http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org