httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Drummond <a.d.drumm...@googlemail.com>
Subject [users@httpd] LimitRequestBody not dropping connections
Date Sat, 09 Jan 2010 20:25:52 GMT
Hi,

I have a problem with using the LimitRequestBody directive to limit
file upload size. I'm using apache 2.2.14 on linux (CentOS). If I
attempt to upload a large file via a browser (I've tried this with
Firefox and Safari), Apache does not drop the connection and only
gives an error  once all the file data has been sent. E.g, if I set
LimitRequestBody to 1 (byte) and then try to upload a 10MB file, the
connection is not dropped immediately. However, although the
connection is not dropped, the error log is immediately updated with:
"Requested content-length of $X is larger than the configured limit of
$Y".

Oddly, if I telnet to the server and send something like:

POST /webappdir/ HTTP/1.0
Content-Length: 3000000000

Apache sends a 413 and closes the connection as soon as I enter the
line break after the headers. I've checked that Firefox is sending an
appropriate Content-Length header, so the difference in browser/telnet
behavior should not be down to this.

The POST requests are being handled by a Perl app (using Catalyst). I
get the same results running it under mod_fastcgi and mod_perl. I've
heard that LimitRequestBody doesn't work properly with mod_fastcgi,
but there are many references to people using it with mod_perl. In any
case, since requests over telnet like the one above do cause the
connection to be dropped immediately, I don't think this is a
mod_perl/mod_fastcgi issue per se.

I'm sure I'm doing something stupid here, or there is something wrong
with my configuration, but if anyone could shed some light on this
this it would be very much appreciated.
Alex

---------------------------------------------------------------------
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


Mime
View raw message