Hi,

I've just tried that script again (see link below) using a POST request.
In the error log file, there is the content of the POST Request e.g.
user=cpringle&password=xxxxx but nothing else. There is no HTTP headers.
My Apache directive to enable the filter is

PerlInputFilterHandler iPAQApache::ResetBrowser

Is this the correct directive?


********   _/        ***********************************************
*****     _/           ******    Chris Pringle                    **
****     _/             *****    Industrial Trainee               **
***     _/_/_/ _/_/_/   *****    Personal Systems Group (PSG)     **
***    _/  _/ _/  _/    *****    Hewlett Packard - Bristol        **
***   _/  _/ _/_/_/     *****                                     **
****        _/ INVENT  ******    Tel   - +44 (0) 117 31 29664     **
******     _/        ********    Email - [EMAIL PROTECTED]     **
*******   _/       ************************************************* 



-----Original Message-----
From: Stas Bekman [mailto:[EMAIL PROTECTED] 
Sent: 18 September 2003 11:37
To: Pringle, Chris (HP-PSG)
Cc: [EMAIL PROTECTED]
Subject: Re: [mp2][QUESTION]: Filter to modify request headers on a
proxy server


Pringle, Chris (HP-PSG) wrote:
> Hi,
> 
> I am trying to write a filter that will sit on a proxy server and
> alter HTTP requests. Basically, what I want it to do is modify the 
> User-Agent header field so that when the request is proxied, the 
> remote web server gets a different User-Agent header field to the one 
> that was originally sent by the browser. There are also other header 
> fields I may need to modify, but I would imagine this is a simple task

> once I've worked out how to alter the User-Agent field.
> 
> Does anyone have any ideas how I might go about doing this? I've tried
> writing several PerlInputFilterHandlers, all with no success. Will 
> input filters work with a proxy? I've got output filters working with 
> no problem.
> 
> Any sample code to do what I want, along with the relavent Apache
> directives would be very  much appreciated!

The sample code that you need is here:
http://perl.apache.org/docs/2.0/user/handlers/filters.html#Connection_In
put_Filters

I haven't tried to mix filters with proxy, but I see no reason why
shouldn't 
it work. It might not work if proxy is implemented as a filter itself
and is 
running before the modperl filters, need to look at the actual
implementation.

__________________________________________________________________
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