httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: another quirk
Date Thu, 07 Nov 1996 13:07:44 GMT
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.

(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



-=-=-=-=
Minor bug:

1234567890<!--#include virtual="/ten.html" -->1234567890                        

If "ten.html" contains 10 "1234567890" I'd expect to see output of:

123456789012345678901234567890

but instead I see

12345678901234567890
1234567890


..maybe that's not so minor, it could cause grief inside <PRE> and other
\n sensitive blocks.


rob
-- 
Rob Hartill.       Internet Movie Database Ltd.    http://www.imdb.com/  

Mime
View raw message