Re: bytes_received?

[prev] [thread] [next] [Date index for 2004/12/09]

From: Stas Bekman
Subject: Re: bytes_received?
Date: 19:46 on 09 Dec 2004
Malcolm J Harwood wrote:
> Is there an equivalent of Apache::RequestRec::bytes_sent for the size of the 
> incoming request? (I have a situation where I need to log the size of the 
> data transfer each way to a db). I've searched through the docs (and google) 
> and not found anything.


> The closest I've found to getting this is "length $r->as_string;" which is 
> ugly and likely very inefficient. Is there a better way? 

$ENV{CONTENT_LENGTH} or $r->headers_in->{CONTENT_LENGTH}? Of course it's 
not guaranteed that it'll be set.


        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

bytes_received?
Malcolm J Harwood 15:41 on 09 Dec 2004

Re: bytes_received?
Stas Bekman 19:46 on 09 Dec 2004

Re: bytes_received?
Geoffrey Young 21:21 on 09 Dec 2004

Re: bytes_received?
Stas Bekman 21:27 on 09 Dec 2004

Re: bytes_received?
Geoffrey Young 21:28 on 09 Dec 2004

Re: bytes_received?
Malcolm J Harwood 23:01 on 09 Dec 2004

Re: bytes_received?
Stas Bekman 23:51 on 09 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52