httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: OutputFilter Altering Response Body
Date Mon, 20 Mar 2006 09:30:02 GMT
On Monday 20 March 2006 03:15, William wrote:
> Hi

FWIW, you'd be more on-topic on the apache-modules list.

>  I am creating an output filter that will alter the http response of an
> http requset.  The output filter hook function's signature takes two
> parameters ap_filter* and apr_bucket_brigade*. How can I get a char* buffer
> of the context body of the http resonse from ap_filter* or
> apr_bucket_brigade*.

See any example.  Or http://www.apachetutor.org/dev/brigades

> Also how can I place the altered char* buffer in the 
> response or can I alter the char* buffer with out making a copy of it.

Whichever you want.  The above example shows it without copying.
That's not always a reasonable expectation, so you have the stdio-like
API too.  FWIW the book uses mod_xmlns as a demonstration of
using the latter.

-- 
Nick Kew

Mime
View raw message