Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: HTTP::Proxy traffic calculating

by BooK (Curate)
on Feb 22, 2005 at 13:22 UTC ( #433325=note: print w/ replies, xml ) Need Help??


in reply to HTTP::Proxy traffic calculating

$message is a HTTP::Response object when your filter is a response filter, so you can access the request via $message->request(). This should let you compute your stats in the response filter.

Please note that HTTP::Proxy does currently behave well with large request bodies: it loads the whole request body in memory before processing and sending it to the next hop. This is more than often okay, except when you upload very laaaarge files.


Comment on Re: HTTP::Proxy traffic calculating
Re^2: HTTP::Proxy traffic calculating
by b888 (Beadle) on Feb 22, 2005 at 14:37 UTC

    The main problem is that incoming data (response from external sources) comes to defined filter in chunks. For example for google.com there are 4 chunks, means 4 calls of sub defined in

    $proxy->push_filter(response => ...

    And $$buffer value seems desapearing in last (always 0-sized) chunk.

    p.s. Thanks for great component :)

    Broken code tag repaired by davido.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433325]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2014-09-18 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls