httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Robinson <d...@esi.co.uk>
Subject Re: another quirk
Date Thu, 07 Nov 1996 15:47:31 GMT
On Thu, 7 Nov 1996, Rob Hartill wrote:

> I wrote:
> 
> >I'm seeing things logged with much smaller 'byte sent' numbers that actually
> >sent.
> >
> >Allmost all my pages have SSI via XBITHACK. With non-SSI documents, the
> >'bytes sent' number is correct.
> >
> >I might look at this later if nobody beats me to it.
> 
> 
> Here's a possible fix:
> 
> fb->bytes_sent is having the 'bytes so far sent' subtracted each time
> bsetopt() is called. Presumably this is based on an asumption that it is
> only called once and after the headers have been sent. However, that's not
> true with SSI where it is called often.

I think its wrong to say that 'buff.c assumes bsetopt is only called once'.
As far as I recall, this was a general routine to reset the count of bytes
sent to be zero at some particular moment.

Rather than breaking bsetopt so that it can only function once, would it
not be better to stop the SSI module from repeatedly resetting the count?
Otherwise, you might break the byte counts in the proxy module or when you
have persistant connections. (Apologies if I am wrong on that.)

 David.

> (minor SSI bug follows this patch)
> 
> *** buff.c.orig	Thu Nov  7 13:01:25 1996
> --- buff.c	Thu Nov  7 13:01:29 1996
> ***************
> *** 149,155 ****
>   {
>       if (optname == BO_BYTECT)
>       {
> ! 	fb->bytes_sent = *(const long int *)optval - (long int)fb->outcnt;
>   
>   	return 0;
>       } else
> --- 149,156 ----
>   {
>       if (optname == BO_BYTECT)
>       {
> ! 	if (fb->bytes_sent == 0)
> ! 		fb->bytes_sent = *(const long int *)optval - (long int)fb->outcnt;
>   
>   	return 0;
>       } else

Mime
View raw message