Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 40445 invoked from network); 4 May 2005 12:27:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2005 12:27:13 -0000 Received: (qmail 45079 invoked by uid 500); 4 May 2005 12:28:49 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 45049 invoked by uid 500); 4 May 2005 12:28:48 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 45034 invoked by uid 99); 4 May 2005 12:28:48 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from hub.org (HELO hub.org) (200.46.204.220) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 04 May 2005 05:28:48 -0700 Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id F281764DCF1; Wed, 4 May 2005 09:26:48 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44899-03; Wed, 4 May 2005 12:26:44 +0000 (GMT) Received: from localhost (wm.hub.org [200.46.204.128]) by hub.org (Postfix) with ESMTP id BACE664DCEC; Wed, 4 May 2005 09:26:48 -0300 (ADT) Received: from krakint2gw.krak.dk (krakint2gw.krak.dk [193.109.57.252]) by webmail.muly.dk (Horde MIME library) with HTTP for ; Wed, 04 May 2005 12:26:44 +0000 Message-ID: <20050504122644.smx1964sg00sc88w@webmail.muly.dk> Date: Wed, 04 May 2005 12:26:44 +0000 From: allan@muly.dk To: Stas Bekman Cc: modperl@perl.apache.org Subject: Re: advice needed: mod_perl reverse proxy References: <4266AAE9.2080107@muly.dk> <4266BA8B.2040700@stason.org> <4266C15A.9010908@muly.dk> <4266D2DE.7060703@stason.org> <4273E8ED.9000905@muly.dk> <4275CD47.8010202@stason.org> <4277C618.8090509@muly.dk> <4277FDC4.40503@stason.org> In-Reply-To: <4277FDC4.40503@stason.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.1-cvs X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Quoting Stas Bekman : > 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_ ok maybe i have a screwed installiation or a missing use/namespace . "method not found" message in my error.log. >> 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. Jeff's suggestion does indeed work. oddly enough ; ./a