Hi,

i'am working on mod_cache and mod_mem_cache + mod_proxy
i found a problem with EOS Bucket.

mod_cache is inserting his cache_in filter in output_filter when he 
wants to insert data in the cache.
when mod_cache is used with mod_proxy, the cache_in filter is called 
after mod_proxy call ap_pass_brigade in the 
ap_proxy_http_process_response, after received data from backend server.

when i do test on a website, sometimes, i can see my file is not cached 
because length > MaxStreamingBuffer.
when i put a debug on the MaxStreamingBuffer value, i always get 0 even 
if i setup in my httpd.conf another value with CacheMaxStreamingBuffer.
So maybe a first bug here.

But the problem doesn't come from this bug.

When i process my test, i can see that some files are not cached because 
of this error, so i put debug in the function calculating the length of 
data to be cached in mod_cache.
And something really strange happen, strange for me, but maybe not for 
you....

what happen:

APR_BRIGADE_FOR_EACH(e,in){

look if bucket is eos, if yes, exit with all_bucket_here=1
or: look if bucket is flush, if yes, exit with unresolved_length=1
or: size += e->length;

}

on the file not cached because the MaxStreamingBuffer error, the code 
above never detect a EOS bucket, so, it return a size to the following code:

if (!all_bucket_here){
if (unresolved_length || size > MaxStreamingBuffer)
exit with MaxStreamingBuffer Error.
}

Where it's really strange, is i put a debug in mod_proxy, when it 
receive the data from backend server, and before passing the brigade to 
the output_filter, i can detect a EOS Bucket.
So, i have a EOS Bucket found in the brigade mod_proxy will pass to 
output_filter, and in the filter reading the same brigade in mod_cache 
(cache_in filter), i can't find this same EOS Bucket.

if someone have an idea :)
i will continue to search on that.

Best regards,

Estrade Matthieu



Reply via email to