On Sat, Jan 9, 2010 at 3:25 PM, Alex Drummond <a.d.drumm...@googlemail.com> wrote: > 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.
Maybe a HTTP/1.0 difference? Apache will try hard to drain that request body, because browsers don't try to read a response until their body has been read. This means LimitRequestBody doesn't save you so much on bandwidth, but protecting whatever backend app would have had to use the large body (IIUC) -- Eric Covener cove...@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-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org