httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Jones <>
Subject getsfunc_BRIGADE tries to split a pipe bucket
Date Wed, 08 Jan 2003 19:35:15 GMT
I am trying to trace a problem between mod_cgid and mod_cache. Sorry if
this seems like a request for support, but this is too technical for
other lists.

In 2.0.43 mod_cgid will use apr_bucket_pipe_create so that it can call
ap_scan_script_header_err_brigade to remove the script headers from the
output and place them into r->headers_out.

ap_scan_script_header_err_brigade is just a call to
ap_scan_script_header_err_core with getsfunc_BRIGADE. This function
tries to act like gets(), and therefore must split the bucket after each

The problem is, the bucket is a pipe, and from what I can tell, you can
split pipe buckets.

I got this far because mod_cache won't cache the output of my CGI
script. It turns out that when it reads the bucket to place the output
in the cache (mod_mem_cache) the bucket contains the script headers.
This cause the buffer overflow check to fail, and thus the caching to

Am I missing something here? I must be because the script output looks
good (the body does not contain the headers), but it shows up in

BTW, I made CACHE_IN run as AP_FTYPE_CONTENT_SET+20 so that it would run
as late as possible.

Peter Jones <jesus;unix;c++;crypto;vi;4wd;geek> [ ]
PGP Fingerprint: 27AD 7922 D3BC 46A3 3627 D7B4 4240 46C3 A41E 844A

View raw message