Geoffrey Young wrote:

I have written a OutputFilter that finds a string in a response and
replaces the string with another. It works fine with static files, but
not on response from a reverse proxy, and that is just what I want to
achieve. I'm trying to run my Outlook Web Access backend behind an
Apache frontend.

Running Apache::Clean for instance does work on reverse proxied content,
it seems.


are you saying that Apache::Clean works fine but your altered code does not?
  I didn't see anything in your code that looked unusual. if you could
reduce the Apache::Clean test suite to a minimal code + test that reproduced
your problem it would help alot.

Michael's filter is different in a sense that it may enlarge the original input, whereas Apache::Clean always shrinks it. So in this code:


   while ($f->read(my $buffer, BUFF_LEN)) {
       $buffer =~ s/$src/$dst/ig;
       $f->print($buffer);
   }

perl never allocates extra memory for

$buffer =~ s/$src/$dst/ig;

whereas in Michael's case it will if length($src) < length($dst). Michael, if you test with length($src) == length($dst), does the problem go away?

__________________________________________________________________
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

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to