httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Speaking of pipes from cgis causing trouble...
Date Wed, 02 Oct 2002 00:02:38 GMT
At 03:27 PM 10/1/2002, Paul J. Reder wrote:

>Ryan Bloom wrote:
>
>>On Tue, 1 Oct 2002, Paul J. Reder wrote:
>>
>>>I've been working on the caching code and ran across a core dump...
>>>
>>>A particular file contains an SSI call to a cgi. The cgi causes a pipe
>>>bucket to pass down the chain. cache_in_filter tries to save the bucket
>>>away and core dumps.
>>>
>>>Since a pipe bucket can be of any length, and could take any amount of
>>>time to complete, I would assume that the cache code should decide not
>>>to cache any response with a pipe bucket, correct?
>>Not necessarily.  The cache code should stream the data to the cache, and
>>allow the data to also stream to the core_output_filter.
>
>Until it reaches the specified max cache size?
>
>So instead of trying to just copy and insert the pipe bucket, it should read
>from the pipe and add buckets to the cache (and forward copies on)? Seems
>like it would defeat some of the sendfile optimizations and such... Is it worth
>the code and lost optimizations to read/store/pass the piped data?

Not if you read off the headers, determine cacheability, and then send the
remaining pipe bucket down and ignore it when we can't cache the result
anyways.  If the resource can be cached, the penalty for reading and then
storing + sending is nothing when you weigh serving out of the cache,
next time around.

Bill


Mime
View raw message