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 CHANGES
Date Thu, 05 Oct 2000 11:21:35 GMT
trawick     00/10/05 04:21:32

  Modified:    src/include httpd.h util_ebcdic.h
               src/main http_protocol.c util_charset.c util_ebcdic.c
                        http_request.c
               src/modules/standard mod_include.c
               src      CHANGES
  Log:
  Get rid of much of the old implementation of translating the
  charset of response bodies.
  
  ap_checkconv() is removed, except for in os/bs2000 and os/tpf.
  (Anything there is questionable for 2.0 anyway.)
  
  Revision  Changes    Path
  1.90      +0 -4      apache-2.0/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- httpd.h	2000/10/04 23:19:29	1.89
  +++ httpd.h	2000/10/05 11:21:11	1.90
  @@ -579,10 +579,6 @@
   /** structure to aid charset translate between machine and network */
   struct ap_rr_xlate {
       /* contents are experimental! expect it to change! */
  -    /** translation handle to use when going to the network */
  -    apr_xlate_t *to_net;
  -    /** whether or not write translation is single-byte-only */
  -    int to_net_sb;
       /** translation handle to use when coming from the network */
       apr_xlate_t *from_net;
   };
  
  
  
  1.7       +0 -7      apache-2.0/src/include/util_ebcdic.h
  
  Index: util_ebcdic.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/util_ebcdic.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- util_ebcdic.h	2000/08/07 01:48:55	1.6
  +++ util_ebcdic.h	2000/10/05 11:21:12	1.7
  @@ -79,13 +79,6 @@
    */
   apr_status_t ap_init_ebcdic(apr_pool_t *pool);
   
  -/**
  - * Check the Content-Type to decide if conversion is needed 
  - * @param r The current request
  - * @return The translation handle to use for the conversion if one is needed
  - */
  -apr_xlate_t *ap_checkconv(request_rec *r);
  -
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.140     +0 -34     apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- http_protocol.c	2000/10/05 03:55:12	1.139
  +++ http_protocol.c	2000/10/05 11:21:20	1.140
  @@ -428,17 +428,6 @@
                              apr_table_get(r->headers_out, "Connection"), "close");
       const char *conn = apr_table_get(r->headers_in, "Connection");
   
  -#ifdef APACHE_XLATE
  -    if (r->rrx->to_net && !r->rrx->to_net_sb) {
  -        /* Translation is not single-byte-only, so we don't know the
  -         * content length. Zap the Content-Length header before the 
  -         * following logic, as the absence of the Content-Length header
  -         * may affect the decision on chunked encoding.
  -         */
  -        apr_table_unset(r->headers_out,"Content-Length");
  -    }
  -#endif /* APACHE_XLATE */
  -
       /* The following convoluted conditional determines whether or not
        * the current connection should remain persistent after this response
        * (a.k.a. HTTP Keep-Alive) and whether or not the output message
  @@ -2075,20 +2064,6 @@
           return;
       }
   
  -#ifdef CHARSET_EBCDIC
  -    /* By default, we convert all content.  ap_checkconv() can decide
  -     * that conversion shouldn't be performed.  Also, if the content type
  -     * contains the "magic" prefix for serving raw ascii
  -     * (text/x-ascii-{plain,html,...}), the type is corrected to the real
  -     * text/{plain,html,...} type which goes into the headers.
  -     * This may not seem like the best place to put this call, but doing
  -     * it here avoids having to call it in every handler (which is
  -     * particularly hard to do with handlers in modules which aren't
  -     * part of the Apache httpd distribution).
  -     */
  -    ap_checkconv(r);
  -#endif
  -      
       /*
        * Now that we are ready to send a response, we need to combine the two
        * header field tables into a single table.  If we don't do this, our
  @@ -3241,15 +3216,6 @@
               return;
           }
       }
  -
  -#ifdef APACHE_XLATE
  -    /* Ensure that the proper translation handle (if any) is used when
  -     * sending the response document to the client.  Note that on an 
  -     * ASCII machine, ap_hdrs_to_ascii is NULL, so this will turn off 
  -     * any translation selected by a module for content.
  -     */
  -    ap_set_content_xlate(r, 1, ap_hdrs_to_ascii);
  -#endif
   
       if ((custom_response = ap_response_code_string(r, idx))) {
           /*
  
  
  
  1.5       +7 -15     apache-2.0/src/main/util_charset.c
  
  Index: util_charset.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_charset.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- util_charset.c	2000/08/07 19:26:00	1.4
  +++ util_charset.c	2000/10/05 11:21:21	1.5
  @@ -75,8 +75,8 @@
    * the source code.
    *
    * For an ASCII machine, these remain NULL so that when they are stored
  - * in the BUFF via ap_bsetop(BO_WXLATE or BO_RXLATE) it ensures that no
  - * translation is performed.
  + * in the BUFF via ap_bsetop(BO_RXLATE) it ensures that no translation is 
  + * performed.
    */
    
   apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii;
  @@ -101,22 +101,14 @@
   {
       apr_status_t rv;
   
  -    if (output) {
  -        r->rrx->to_net = xlate;
  -        if (xlate) {
  -            apr_xlate_get_sb(r->rrx->to_net, &r->rrx->to_net_sb);
  -        }
  -        rv = ap_bsetopt(r->connection->client, BO_WXLATE, &xlate);
  -    }
  -    else {
  -        r->rrx->from_net = xlate;
  -        rv = ap_bsetopt(r->connection->client, BO_RXLATE, &xlate);
  -    }
  +    ap_assert(output == 0);
   
  +    r->rrx->from_net = xlate;
  +    rv = ap_bsetopt(r->connection->client, BO_RXLATE, &xlate);
  +
       if (rv) {
           ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                      "BO_%sXLATE failed",
  -                      output ? "W" : "R");
  +                      "BO_RXLATE failed");
       }
   
       return rv;
  
  
  
  1.13      +0 -42     apache-2.0/src/main/util_ebcdic.c
  
  Index: util_ebcdic.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_ebcdic.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- util_ebcdic.c	2000/08/07 20:09:44	1.12
  +++ util_ebcdic.c	2000/10/05 11:21:22	1.13
  @@ -123,46 +123,4 @@
       return APR_SUCCESS;
   }
   
  -#define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-" /* Text files whose content-type starts
with this are passed thru unconverted */
  -
  -/* Check the Content-Type to decide if conversion is needed */
  -apr_xlate_t *ap_checkconv(struct request_rec *r)
  -{
  -    int convert_to_ascii;
  -    const char *type;
  -    apr_xlate_t *zero = NULL;
  -
  -    /* To make serving of "raw ASCII text" files easy (they serve faster 
  -     * since they don't have to be converted from EBCDIC), a new
  -     * "magic" type prefix was invented: text/x-ascii-{plain,html,...}
  -     * If we detect one of these content types here, we simply correct
  -     * the type to the real text/{plain,html,...} type. Otherwise, we
  -     * set a flag that translation is required later on.
  -     */
  -
  -    type = (r->content_type == NULL) ? ap_default_type(r) : r->content_type;
  -
  -    /* If no content type is set then treat it as (ebcdic) text/plain */
  -    convert_to_ascii = (type == NULL);
  -
  -    /* Conversion is applied to text/ files only, if ever. */
  -    if (type && (strncasecmp(type, "text/", 5) == 0 ||
  -		 strncasecmp(type, "message/", 8) == 0)) {
  -	if (strncasecmp(type, ASCIITEXT_MAGIC_TYPE_PREFIX,
  -			sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1) == 0)
  -	    r->content_type = apr_pstrcat(r->pool, "text/",
  -					 type+sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1,
  -					 NULL);
  -        else
  -	    /* translate EBCDIC to ASCII */
  -	    convert_to_ascii = 1;
  -    }
  -    /* Turn off conversion if it's not a text document */
  -    if (!convert_to_ascii) {
  -        ap_set_content_xlate(r, 1, zero);
  -    }
  -
  -    return convert_to_ascii ? ap_locale_to_ascii : NULL;
  -}
  -
   #endif /* CHARSET_EBCDIC */
  
  
  
  1.53      +0 -12     apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- http_request.c	2000/10/05 02:11:11	1.52
  +++ http_request.c	2000/10/05 11:21:23	1.53
  @@ -983,19 +983,7 @@
   
       /* see comments in process_request_internal() */
       ap_run_insert_filter(r);
  -
  -#ifndef APACHE_XLATE
       retval = ap_invoke_handler(r);
  -#else /*APACHE_XLATE*/
  -    {
  -        /* Save the output conversion setting across subrequests */
  -        apr_xlate_t *saved_xlate;
  -
  -        ap_bgetopt(r->connection->client, BO_WXLATE, &saved_xlate);
  -        retval  = ap_invoke_handler(r);
  -        ap_bsetopt(r->connection->client, BO_WXLATE, &saved_xlate);
  -    }
  -#endif /*APACHE_XLATE*/
       ap_finalize_sub_req_protocol(r);
       return retval;
   }
  
  
  
  1.65      +0 -4      apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_include.c	2000/09/22 14:57:08	1.64
  +++ mod_include.c	2000/10/05 11:21:26	1.65
  @@ -2514,10 +2514,6 @@
        * expect to be signal-ready to SIGALRM.  There is no clean way to
        * fix this, except to put alarm support into BUFF. -djg
        */
  -#ifdef CHARSET_EBCDIC
  -    /* XXX:@@@ Is the generated/included output ALWAYS in text/ebcdic format? */
  -    ap_bsetopt(r->connection->client, BO_WXLATE, &ap_hdrs_to_ascii);
  -#endif
   
       send_parsed_content(&b, r, f);
       ap_pass_brigade(f->next, b);
  
  
  
  1.249     +2 -1      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.248
  retrieving revision 1.249
  diff -u -r1.248 -r1.249
  --- CHANGES	2000/10/05 05:42:03	1.248
  +++ CHANGES	2000/10/05 11:21:30	1.249
  @@ -82,7 +82,8 @@
   
     *) Charset translation: mod_charset_lite handles output content 
        translation in a filter.  mod_charset_lite no longer ignores 
  -     subrequests.  [Jeff Trawick]
  +     subrequests.  A bunch of cruft related to BUFF's support for
  +     translating response bodies was removed.  [Jeff Trawick]
   
     *) Move the addition of the CORE filter to the post_read_request
        hook in http_core.c.  This removes the need to add the filter in
  
  
  

Mime
View raw message