httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: [rfc] [apreq-2] filter prefetch
Date Fri, 18 Jul 2003 12:52:34 GMT
Stas Bekman <> writes:


> Are you talking about having a copy of the POSTed data and another
> copy of the parsed data, when you are saying:
>     we have to be careful not to let the spooled POST data
>     consume lots of RAM.

Yes (I committed the change yesterday).  The "extra copy" 
would be written to a tempfile bucket whenever it exceeded
req->cfg->max_brigade_size (currently 256 KB).  This is the
same cutoff used for file uploads.

> Otherwise what's wrong with using all the needed RAM for the POSTed data?

It's a bad idea to leave a full copy of a large file upload in RAM.
We don't do that with libapreq-1, so we shouldn't do that in 
libapreq-2 either.

> There is a limit argument which tells how big POSTed data can be, no?

Yes, but that doesn't make it acceptable for us to use *that*
amount of RAM for libapreq.  If a user needs to upload a 100MB
file, libapreq-2 shouldn't need more than 1MB of RAM to handle 
that request, even if the filter has to spool the full 100MB 
of POST data.

Joe Schaefer

View raw message