httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c
Date Fri, 18 Aug 2000 04:46:08 GMT
rbb         00/08/17 21:46:08

  Modified:    src/main http_core.c
  Log:
  Fix chunking.  Two bugs fixed.
  
  1)  don't put the trailing 0\r\n\r\n in lenstr; that buffer is
      already in use (pointed to by another transient bucket); using
      lenstr again overlays that other chunk header
  2)  insert the bucket with the trailing "0\r\n\r\n" *before* the eos bucket
  Submitted by:	Jeff Trawick <trawickj@bellsouth.net>
  
  Revision  Changes    Path
  1.104     +6 -5      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- http_core.c	2000/08/17 01:39:12	1.103
  +++ http_core.c	2000/08/18 04:46:07	1.104
  @@ -2942,7 +2942,7 @@
       b->head->prev = dptr;
       dptr->next = b->head;
       b->head = dptr;
  -    dptr = ap_bucket_heap_create("\r\n", 2, &tempint);
  +    dptr = ap_bucket_transient_create("\r\n", 2, &tempint);
       if (hit_eos) {
           b->tail->prev->next = dptr;
           dptr->prev = b->tail->prev;
  @@ -2954,11 +2954,12 @@
       }
   
       if (hit_eos && len != 0) {
  -        apr_snprintf(lenstr, 6, "0\r\n\r\n");
  -        dptr = ap_bucket_transient_create(lenstr, 5, &tempint);
  -        ap_brigade_append_buckets(b, dptr);
  +        dptr = ap_bucket_transient_create("0\r\n\r\n", 5, &tempint);
  +        b->tail->prev->next = dptr;
  +        dptr->prev = b->tail->prev;
  +        b->tail->prev = dptr;
  +        dptr->next = b->tail;
       }
  -        
   
       return ap_pass_brigade(f->next, b);
   }
  
  
  

Mime
View raw message