httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@locus.apache.org
Subject cvs commit: apache-1.3/src/main buff.c
Date Thu, 02 Mar 2000 21:23:40 GMT
martin      00/03/02 13:23:40

  Modified:    src      CHANGES
               src/main buff.c
  Log:
  Recent global changes in CRLF handling broke chunked encoding. Until
  now, I hadn't noticed until now because I always use a HTTP/1.0 proxy in
  front of the origin servers. Now the trailing CRLF after a chunk is sent
  as a constant "pre-encoded ASCII CRLF".
  
  Revision  Changes    Path
  1.1523    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1522
  retrieving revision 1.1523
  diff -u -r1.1522 -r1.1523
  --- CHANGES	2000/03/01 09:18:55	1.1522
  +++ CHANGES	2000/03/02 21:23:36	1.1523
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.13
   
  +  *) [EBCDIC] Make chunked encoding work again; it was broken by the
  +     recent CRLF macro changes. An oversight. [Martin Kraemer]
  +
     *) Work around a popular restriction of some sed(1)'s in APACI where
        "1,/<pattern>/" commands start searching for <pattern> at line 2 only.
        [Ralf S. Engelschall]
  
  
  
  1.95      +8 -3      apache-1.3/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/buff.c,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- buff.c	2000/01/11 15:51:32	1.94
  +++ buff.c	2000/03/02 21:23:39	1.95
  @@ -82,6 +82,11 @@
   #define CHUNK_HEADER_SIZE (5)
   #endif
   
  +#ifdef CHARSET_EBCDIC
  +#define ascii_CRLF "\015\012" /* A CRLF which won't pass the conversion machinery */
  +#else
  +#define ascii_CRLF CRLF
  +#endif
   
   /* bwrite()s of greater than this size can result in a large_write() call,
    * which can result in a writev().  It's a little more work to set up the
  @@ -1157,7 +1162,7 @@
   	return -1;
       if (write_it_all(fb, buf, nbyte) == -1)
   	return -1;
  -    if (write_it_all(fb, CRLF, 2) == -1)
  +    if (write_it_all(fb, ascii_CRLF, 2) == -1)
   	return -1;
       return nbyte;
   #else
  @@ -1170,7 +1175,7 @@
   #endif /*CHARSET_EBCDIC*/
       vec[1].iov_base = (void *) buf;	/* cast is to avoid const warning */
       vec[1].iov_len = nbyte;
  -    vec[2].iov_base = CRLF;
  +    vec[2].iov_base = ascii_CRLF;
       vec[2].iov_len = 2;
   
       return writev_it_all(fb, vec, (sizeof(vec) / sizeof(vec[0]))) ? -1 : nbyte;
  @@ -1211,7 +1216,7 @@
   	vec[nvec].iov_base = (void *) buf;
   	vec[nvec].iov_len = nbyte;
   	++nvec;
  -	vec[nvec].iov_base = CRLF;
  +	vec[nvec].iov_base = ascii_CRLF;
   	vec[nvec].iov_len = 2;
   	++nvec;
       }
  
  
  

Mime
View raw message