httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: Earliest Hook to Inspect POST Params
Date Sun, 01 Aug 2004 19:04:36 GMT
Joe Schaefer wrote:
> Stas Bekman <> writes:
>>Joe Schaefer wrote:
>>>Stas Bekman <> writes:
>>>>Joe Schaefer wrote:
>>>>>No actual data gets copied by mod_apreq, only the buckets are copied.
>>>>So what happens if the buckets are destroyed in the response handler phase?
>>>Any buckets that actually need to be kept around (eg buckets
>>>representing a file upload) are set aside by the parser.
>>Meaning that if a consumer has manually parsed the buckets and
>>destroyed them, the set-aside buckets' content will be fully copied.
> Incorrect- the data in a heap bucket, which is the bucket type that
> normally comes down the input filter chain, is *refcounted*.  Destroying 
> a heap bucket is just like destroying a reference in perl: the object 
> it points to doesn't go away until its refcount is zero, and making
> a copy of the reference does not induce a copy of the object, it just
> bumps the refcount.  Also note: setaside is a noop on heap buckets,
> we only need to call apr_bucket_setaside because it's not a noop
> with other bucket types.

Excellent then!

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message