Thanks for your help on this issue. I have modified my code so that it
uses the same technique as the one you wrote, and it's now working quite
well :)

I'm quite interested in the idea of having a generalized bit of code to
modify HTTP headers. However, I'm not a particularly experienced Perl
programmer, and have little knowledge of Mod_Perl's interaction with
Apache. 

Thanks once again for your help. It would have taken me a very long time
to overcome this problem without it.

---
Regards,
Chris Pringle

UK PSG
Hewlett-Packard, Bristol
Tel: +44 117 31 29664


> -----Original Message-----
> From: Stas Bekman [mailto:[EMAIL PROTECTED] 
> Sent: 07 October 2003 02:12
> Cc: Pringle, Chris (HP-PSG); [EMAIL PROTECTED]
> Subject: Re: [QUESTION] Relating a request to a response
> 
> 
> Stas Bekman wrote:
> [...]
> > The following is a much more generic example than you need, so you 
> > will
> > be able to simplify it a great deal. I'll commit that soon as a new 
> > test. I see some problem which I need to debug more, but it 
> won't affect 
> > your task.
> 
> I've committed a fix to this problem. the test that I 
> committed earlier 
> demonstrates how to write filters that manipulate only HTTP 
> headers, without 
> ever touching or even seeing the request/response body.
> 
> I thought a bit more about your request and came to 
> conclusion that it should 
> be trivial to generalize this code and put it on CPAN as 
> Apache::FilterHeadersManip, which will be very simple to use 
> for end users. 
> You will need to provide a callback function, which will 
> receive a ref to an 
> array of headers (input or output), which that callback will 
> manipulate, by 
> changing and/or removing the existing headers and/or adding 
> new ones. Once 
> this callback returns Apache::FilterHeadersManip will use the 
> correct way to 
> flush the headers in that array.
> 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> 

Reply via email to