httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c
Date Wed, 25 Oct 2000 15:42:40 GMT
trawick     00/10/25 08:42:39

  Modified:    src/main http_core.c
  Log:
  EBCDIC: Make chunk_filter() write chunk headers/trailers in ASCII.
  
  Revision  Changes    Path
  1.187     +13 -2     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.186
  retrieving revision 1.187
  diff -u -r1.186 -r1.187
  --- http_core.c	2000/10/25 15:02:57	1.186
  +++ http_core.c	2000/10/25 15:42:38	1.187
  @@ -3218,6 +3218,8 @@
    */
   static apr_status_t chunk_filter(ap_filter_t *f, ap_bucket_brigade *b)
   {
  +#define ASCII_CRLF  "\015\012"
  +#define ASCII_ZERO  "\060"
       ap_bucket_brigade *more = NULL;
       ap_bucket *e;
       apr_status_t rv;
  @@ -3282,6 +3284,15 @@
               /* XXX might be nice to have APR_OFF_T_FMT_HEX */
               hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
                                      "%qx" CRLF, (apr_uint64_t)bytes);
  +#ifdef CHARSET_EBCDIC
  +            {
  +                apr_size_t inbytes_left = hdr_len, outbytes_left = hdr_len;
  +
  +                apr_xlate_conv_buffer(ap_hdrs_to_ascii,
  +                                      chunk_hdr, &inbytes_left,
  +                                      chunk_hdr, &outbytes_left);
  +            }
  +#endif
               e = ap_bucket_create_transient(chunk_hdr, hdr_len);
               AP_BRIGADE_INSERT_HEAD(b, e);
   
  @@ -3289,7 +3300,7 @@
                * Insert the end-of-chunk CRLF before the EOS bucket, or
                * appended to the brigade
                */
  -            e = ap_bucket_create_immortal(CRLF, 2);
  +            e = ap_bucket_create_immortal(ASCII_CRLF, 2);
               if (eos != NULL) {
                   AP_BUCKET_INSERT_BEFORE(eos, e);
               }
  @@ -3313,7 +3324,7 @@
            */
           if (eos != NULL) {
               /* XXX: (2) trailers ... does not yet exist */
  -            e = ap_bucket_create_immortal("0" CRLF /* <trailers> */ CRLF, 5);
  +            e = ap_bucket_create_immortal(ASCII_ZERO ASCII_CRLF /* <trailers> */
ASCII_CRLF, 5);
               AP_BUCKET_INSERT_BEFORE(eos, e);
           }
   
  
  
  

Mime
View raw message