httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-1.3/src/main http_core.c
Date Thu, 04 Nov 1999 19:36:34 GMT
stoddard    99/11/04 11:36:34

  Modified:    src/main http_core.c
  Log:
  This patch corrects a bug in my last patch for Apache 1.3.10 EBCDIC
  conversion.  If the default_handler encounters an error while trying to
  serve a file type that doesn't need conversion (for example, a
  non-existent .gif or .jpg), the resulting error message is not converted
  from EBCDIC to ASCII before it is sent to the browser.  This makes
  reading the error message rather challenging.
  
  Submitted by:	Greg Ames  - gregames@us.ibm.com
  Reviewed by:	Bill Stoddard
  
  Revision  Changes    Path
  1.275     +14 -8     apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.274
  retrieving revision 1.275
  diff -u -r1.274 -r1.275
  --- http_core.c	1999/10/21 20:44:35	1.274
  +++ http_core.c	1999/11/04 19:36:32	1.275
  @@ -3031,14 +3031,7 @@
       caddr_t mm;
   #endif
   #ifdef CHARSET_EBCDIC
  -    /* 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.
  -     */ 
  -    int convert_flag = ap_checkconv(r);
  +    int convert_flag;
   #endif
   
       /* This handler has no use for a request body (yet), but we still
  @@ -3095,6 +3088,19 @@
           return errstatus;
       }
   
  +#ifdef CHARSET_EBCDIC
  +    /* 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.
  +     *
  +     * Note: convert_flag is not used in the MMAP path;
  +     * ap_checkconv() sets a request_req flag based on content_type
  +     */ 
  +    convert_flag = ap_checkconv(r);
  +#endif
   #ifdef USE_MMAP_FILES
       ap_block_alarms();
       if ((r->finfo.st_size >= MMAP_THRESHOLD)
  
  
  

Mime
View raw message