perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: advice needed: mod_perl reverse proxy
Date Tue, 03 May 2005 22:40:04 GMT
allan juul wrote:
[...]
>> Use must use $r->set_content_length(). See the mp2 test suite for 
>> examples.
> 
> 
> (i don't have that method available in my mod_perl2)

You sure do :)

% lookup set_content_length
To use method 'set_content_length' add:
         use Apache2::Response ();
http://perl.apache.org/docs/2.0/api/Apache2/Response.html#C_set_content_length_

> but about collecting data in a buffer variable. it seems i can actually 
> $f->print that buffer, but not actually calculate the length of it. or 
> rather: i can calculate the length but when i set any header the value 
> is 0 (whether i set it before the $f->print statement or after).
> it seems i must admit that i don't quite get what is going on and when.
> 
> can anyone supply a simple example i then can check on our reverse proxy ?

Try: t/response/TestApache/content_length_header.pm
Though I haven't tried to call it from the filter, so may be Jeff's 
suggestion will work.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message