Re: advice needed: mod_perl reverse proxy

[prev] [thread] [next] [Date index for 2005/05/03]

From: allan juul
Subject: Re: advice needed: mod_perl reverse proxy
Date: 18:42 on 03 May 2005
Stas Bekman wrote:
> allan juul wrote:
> 
>> hi stas
>>
>> Stas Bekman wrote:
>>
>>> allan juul wrote:
>>> [...]
>>
>>
>>
>>>>> But if you use a mod_perl filter you will still hit the issue of 
>>>>> unknown content-length header.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> yes, of course that's true.
>>>> there goes caching (:
>>>
>>>
>>>
>>>
>>> Not really. Nothing prevents you from buffering up the response, 
>>> process it, set the content-length header and make the document 
>>> cache-able.
>>
>>
>>
>> ok, eh how do i that. you mean instead of printing to STDOUT, collect 
>> data in a buffer, then set the calculated Content-Length, then print 
>> data?
> 
> 
> That's right.
> 
>> anyway, it's pretty strange. it seems i'm able to set the 
>> Content-Length when i use the mod_perl_filter and do *not* reverse 
>> proxy. see both headers below. the strange things is that i'm not 
>> allowed at all to set the standard Content-Length, but indeed allowed 
>> to set a custom one called Content-Length2. and even stranger is that 
>> this custom header presents a correct value when *not* proxying but 
>> "0" when proxying. i use the exact same mod_perl code, also supplied 
>> below. the actual filtering of data content works in both cases.
> 
> 
> 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)


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 ?

thanks
./allan






(message missing)

advice needed: mod_perl reverse proxy
allan juul 19:18 on 20 Apr 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 20:24 on 20 Apr 2005

Re: advice needed: mod_perl reverse proxy
allan juul 20:53 on 20 Apr 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 22:08 on 20 Apr 2005

Re: advice needed: mod_perl reverse proxy
allan juul 20:22 on 30 Apr 2005

compile mod_perl with Apache::DBI support
jiesheng zhang 05:07 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
Stas Bekman 06:43 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
jiesheng zhang 12:10 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
Perrin Harkins 14:48 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
jiesheng zhang 16:21 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
Perrin Harkins 16:22 on 02 May 2005

Re: compile mod_perl with Apache::DBI support
jiesheng zhang 16:46 on 02 May 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 06:48 on 02 May 2005

Re: advice needed: mod_perl reverse proxy
Devin Murphy 20:25 on 20 Apr 2005

Re: advice needed: mod_perl reverse proxy
Dominique Quatravaux 08:38 on 21 Apr 2005

Re: advice needed: mod_perl reverse proxy
Alex Greg 09:08 on 21 Apr 2005

Re: compile mod_perl with Apache::DBI support
Michael Peters 17:02 on 02 May 2005

Re: advice needed: mod_perl reverse proxy
allan juul 18:42 on 03 May 2005

Re: advice needed: mod_perl reverse proxy
Jeff Ambrosino 20:12 on 03 May 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 22:40 on 03 May 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 01:56 on 10 May 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 16:43 on 10 May 2005

Re: advice needed: mod_perl reverse proxy
Stas Bekman 01:59 on 10 May 2005

Generated at 06:56 on 17 May 2005 by mariachi v0.52