httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Bug in chunked encoding in Apache 1.2.4 (fwd)
Date Sat, 10 Jan 1998 07:11:10 GMT
Henrik tells me this appears to fix the bug he's seeing with 1.2. 

Dean

On Fri, 2 Jan 1998, Dean Gaudet wrote:

> Hi Henrik,
> 
> Spaces are permitted after the chunked length, you know that right? 
> Apache does generate them (because it guesses how much space it will need
> to write the length, and then goes back later to fill it in and fills with
> trailing spaces), but this does look wrong. 
> 
> Are you using a special html module that's using rputc() to send output? 
> There's a definate bug in rputc() but I'm not sure it can be triggered
> easily in 1.2.x (whereas in 1.3b3 it happens quite easily).  Maybe you can
> try this patch? 
> 
> Dean
> 
> Index: buff.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/buff.c,v
> retrieving revision 1.26.2.1
> diff -u -r1.26.2.1 buff.c
> --- buff.c	1997/08/07 08:41:46	1.26.2.1
> +++ buff.c	1998/01/02 19:01:27
> @@ -584,9 +584,16 @@
>  bflsbuf(int c, BUFF *fb)
>  {
>      char ss[1];
> +    int rc;
>  
>      ss[0] = c;
> -    return bwrite(fb, ss, 1);
> +    rc = bwrite(fb, ss, 1);
> +    /* We do start_chunk() here so that the bputc macro can be smaller
> +     * and faster
> +     */
> +    if (rc == 1 && (fb->flags & B_CHUNK))
> +	start_chunk(fb);
> +    return rc;
>  }
>  
>  /*
> 
> 
> 
> 


Mime
View raw message