You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Dankwerth <da...@ri3k.com> on 2001/11/06 10:26:39 UTC

mod_jk and file upload limits

Hello 

I hate to hassle you again , but i sent to this mailing list 
a (very) small "patch" to mod jk to support rejecting requests that 
exceed a certain size.

Apache has this feature supported by a LimitRequestBody 
using this feature Apache rejects the request and sends back error code 413
and a developer can than handle it (using ErrorDocument for example).

The problem is that mod jk takes over the request before apache manages to
reject it
so mod jk and tomcat start serving the request , apache rejects it and you
get nasty 
errors on "Failed to read from webserver" on mod jk and THREAD PROBLEM
messages in 
tomcat.

The "patch" is very simple, the patch changes the jk_translate function in
mod_jk
that function "decides" if the request should be handled by mod_jk
the patch addes query to a JkEnvVar called JkLimitRequestBody 
That Env Variable can have 2 type of information 
1. apache , which means , use Apache's LimitRequestBody parameter for size
allowed
2. a size in bytes 

or not exist.
if the request exceeds that byte size , the jk_translate declines the
request and the request
never reaches tomcat , apache can than safly handle the 413 error.

can you please let me know what is the status of this "patch" , 
if its no good can you please let me know

Thanks
David Dankwerth




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>