Roger Espel Llima <[EMAIL PROTECTED]> writes:

> > The patch makes mod_proxy buffer the post data in a temp file
> > by setting the (new) ProxyPostMax directive to a positive number.
> > If the Content-Length header supplied by Z is greater than this
> > number, mod_proxy rejects the post request.
> 
> Why a temp file?  Maybe I'm particular about this but I don't like
> programs writing to temp files and re-reading them for no particular
> reason.  Since you're limiting the size anyway, why not just make it a
> memory buffer?  Or you could write to a temp file only when it's greater
> than some constant (say, 16k), which would let most of your POSTs go
> without touching the filesystem.

On linux, the ext2 filesystem is VERY efficient at buffering filesystem 
writes (see http://www.tux.org/lkml/#s9-12).  If the post data is small 
( I don't know what the default size is, but the FILE buffer for the tmpfile
is adjustable with setvbuf) it's never written to disk.  AFAIK, the only 
problem with this arrangement for small posts is the extra file descriptor 
consumed by the apache process.  

It might be a good idea to put in a config setting for the FILE buffer size
also- similar to ProxyReceiveBufferSize.

-- 
Joe Schaefer
[EMAIL PROTECTED]

SunStar Systems, Inc.

Reply via email to