Re: reverse proxy/logging problem

2007-08-02 Thread Jeff Nokes
I had a similar issue, especially since we have nodes split behind F5 and Netscaler, which both operate differently with respect to header preservation, modification. Our solution was to write our own HeaderParser.pm module and register it as the handler of that apache phase, and attempt to der

RE: Using bytes_sent in mod_perl2

2007-08-02 Thread Steve Hay
Geoffrey Young wrote: unless (exists $ENV{MOD_PERL} ? Apache2::RequestUtil->request()->bytes_sent() : tell STDOUT) { #... send response headers >>> since you no longer send response headers in mp2, isn't this all >>> moot? >> >> Did you overlook the

Re: Using bytes_sent in mod_perl2

2007-08-02 Thread Geoffrey Young
>>> unless (exists $ENV{MOD_PERL} >>> ? Apache2::RequestUtil->request()->bytes_sent() >>> : tell STDOUT) >>> { >>> #... send response headers >> since you no longer send response headers in mp2, isn't this all moot? > > Did you overlook the fact that I'm running all this t

Re: reverse proxy/logging problem

2007-08-02 Thread Jonathan Vanasco
On Aug 2, 2007, at 11:07 AM, Carl Johnstone wrote: I've got a two-apache reverse proxy setup, split over two hosts. The problem I've got is that I'd like to put the user_id in the access logs so that our log analysis software can make use of it. Setting apache->user correctly logs the user

RE: Using bytes_sent in mod_perl2

2007-08-02 Thread Steve Hay
Geoffrey Young wrote: > Steve Hay wrote: >> The code is written in a very out-moded style: it is compatible with >> mod_cgi, runs via ModPerl::Registry (formerly Apache::Registry), and >> produces all its output via explicit print() statements scattered >> left, right and centre, including a print(

Re: mod_perl2 and SDBM-tied hashes

2007-08-02 Thread Brian Reichert
On Sun, Jul 29, 2007 at 03:42:19PM -0400, Jonathan Vanasco wrote: > any reason why you're using sdbm ? you might be better off with bdb, > since it has that shared memory cache feature. My initial experiements worked with SDBM, so I ran with it. :) I suppose I could re-rest with DB_File, if t

Re: reverse proxy/logging problem

2007-08-02 Thread Torsten Foertsch
On Thursday 02 August 2007 17:07, Carl Johnstone wrote: > The problem I've got is that I'd like to put the user_id in the access logs > so that our log analysis software can make use of it. > > Setting apache->user correctly logs the user at the back-end however the IP > addresses are wrong, being

Re: mod_perl2 and SDBM-tied hashes

2007-08-02 Thread Brian Reichert
On Sun, Jul 29, 2007 at 01:49:56PM -0700, Perrin Harkins wrote: > The dbm implementation you're using will not always write everything > to disk until you untie it. To make this transparent, you can use > MLDBM::Sync, which unties and reties on every request. This is > necessary for read/write sh

reverse proxy/logging problem

2007-08-02 Thread Carl Johnstone
Hi, I've got a two-apache reverse proxy setup, split over two hosts. The problem I've got is that I'd like to put the user_id in the access logs so that our log analysis software can make use of it. Setting apache->user correctly logs the user at the back-end however the IP addresses are wro

Re: Using bytes_sent in mod_perl2

2007-08-02 Thread Geoffrey Young
Steve Hay wrote: > I'm in the process of converting some old software from mod_perl1 to > mod_perl2, and I'm finding that $r->bytes_sent() doesn't work as it used > to. yeah. IIRC the issue is that now we have filters, so in order to actually calculate bytes_sent() the filters need to run in th

Using bytes_sent in mod_perl2

2007-08-02 Thread Steve Hay
I'm in the process of converting some old software from mod_perl1 to mod_perl2, and I'm finding that $r->bytes_sent() doesn't work as it used to. The code is written in a very out-moded style: it is compatible with mod_cgi, runs via ModPerl::Registry (formerly Apache::Registry), and produces all i