b888 has asked for the wisdom of the Perl Monks concerning the following question:
Greetings
I there any way to log binded incoming/outgoing requests details. For now I made only separate logging (without support chunks either).
$proxy->push_filter( request => HTTP::Proxy::BodyFilter::simple->new( sub { my ( $self, $dataref, $message, $protocol, $buffer ) = @_; print "[".time_stamp()."][out ". length($message->as_string() || ''). "] ".$message->uri()."\n"; } ) ); $proxy->push_filter( response => HTTP::Proxy::BodyFilter::simple->new( sub { my ( $self, $dataref, $message, $protocol, $buffer ) = @_; if( $$dataref ){ print "[".time_stamp()."][in ". length($$dataref)."]\n"; } } ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP::Proxy traffic calculating
by BooK (Curate) on Feb 22, 2005 at 13:22 UTC | |
by b888 (Beadle) on Feb 22, 2005 at 14:37 UTC |