You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Bennett, Tony - CNF" <Be...@cnf.com> on 2002/10/11 17:29:31 UTC

RE: apache 2.0.43: %b not showing "bytes sent" but "bytes reques ted"

I believe the %b gets its value from the request_rec's bytes_sent
member.  This field is filled in by the content_length output
filter.  It is not filled in during the actual send operation.
Even if it was filled in following each "send", that doesn't 
mean it was received by the client... in the event of a disconnect,
I believe the bytes_sent will always be off.

-tony

-----Original Message-----
From: David Burry [mailto:dburry@tagnet.org] 
Sent: Friday, October 11, 2002 1:59 AM
To: dev@httpd.apache.org
Subject: Re: apache 2.0.43: %b not showing "bytes sent" but "bytes
requested"


ok.... serious problems still...  I've sucessfully installed mod_logio
(finally), and %O is STILL not logging the actual bytes transferred, but the
bytes apache is INTENDING to eventually transfer... if I stop it in the
middle by canceling or disconnecting, this number is horribly too big!!!!
Of course it's a couple bytes larger than %b because of the headers
included, but this is still totally useless for the purpose of figuring out
if/when/whether the whole file was actually downloaded.  Anyone have any
ideas why this is so and how to fix it?  Is the logging happening completely
before the request is finished, could that be the problem?

This should also be a concern for anyone who's using mod_logio to charge for
bandwidth, because customers should be concerned about some serious
overcharging going on here!

I had to install libtool 1.4 and m4 1.4 and this was my configure line:
./configure --prefix=/usr/local/apache_2.0.43+logio --enable-logio --enable-
usertrack --enable-file-cache --enable-cache --enable-mem-cache --enable-sta
tic-support --disable-cgid --disable-cgi --enable-rewrite --with-mpm=worker 
--disable-userdir


Dave

----- Original Message -----
From: "David Burry" <db...@tagnet.org>
> Yes, I've been thinking of experimenting with mod_logio, but I'm a bit
> hesitant to hack out a patch from (or use whole-hog) CVS HEAD into a
> production site that gets 3 terabytes of traffic per day and I'm
embarassed
> to admit how much revenue depends on... ;o)  Thanks for the link, I'll try
> that.  It won't be as accurate as getting the byte count without the
> headers, but at least it should be something better than nothing if it
works
> as described...
>
> If we're not going to fix %s shouldn't we at least fix the documentation
to
> be more accurate?  2.0 and 1.3 really are quite different here.
>
> Dave
>
> ----- Original Message -----
> From: "Bojan Smojver" <bo...@rexursive.com>
> > Have you tried using mod_logio? If won't only give you the "body" bytes,
> but
> > also the "headers" bytes. It reports the number of input bytes too and
> should
> > understand encryption and compression. You can either check it out from
> Apache
> > CVS (HEAD), or download the patch for 2.0.43 here:
> > http://www.rexursive.com/software.html.
> >
> > You'd use it with %I (for input) and %O (for output). It would be
> interesting to
> > know if it reports accurately in the case you described...
>

Re: apache 2.0.43: %b not showing "bytes sent" but "bytes requested"

Posted by David Burry <db...@tagnet.org>.
Being off by a little is better than being off by the whole thing... My
tests show that was Apache 1.3 behavior...  At least that way the value is
close, so if you're charging for bandwidth you're not overcharging so much,
and you can still tell if the whole file got there or not.

Dave

----- Original Message -----
From: "Bennett, Tony - CNF" <Be...@cnf.com>
> I believe the %b gets its value from the request_rec's bytes_sent
> member.  This field is filled in by the content_length output
> filter.  It is not filled in during the actual send operation.
> Even if it was filled in following each "send", that doesn't
> mean it was received by the client... in the event of a disconnect,
> I believe the bytes_sent will always be off.
>
> -tony