You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@hyperreal.org on 1999/10/21 20:23:42 UTC

cvs commit: apache-1.3/src/main http_core.c

stoddard    99/10/21 11:23:41

  Modified:    src/main http_core.c
  Log:
  This patch fixes EBCDIC conversion for Apache 1.3.9 on platforms that
  support mmap.  Currently, ap_checkconv() is called only if mmap is not
  supported, or if mmap fails.  This results in mangled .gif's and .jpg's
  etc. because EBCDIC-ASCII conversion is done by default when
  CHARSET_EBCDIC is defined.
  Submitted by:	Greg Ames
  Reviewed by:	Bill Stoddard
  
  Revision  Changes    Path
  1.273     +8 -9      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.272
  retrieving revision 1.273
  diff -u -r1.272 -r1.273
  --- http_core.c	1999/08/28 02:51:31	1.272
  +++ http_core.c	1999/10/21 18:23:39	1.273
  @@ -3012,7 +3012,14 @@
       caddr_t mm;
   #endif
   #ifdef CHARSET_EBCDIC
  -    int convert_flag;
  +    /* 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);
   #endif
   
       /* This handler has no use for a request body (yet), but we still
  @@ -3092,14 +3099,6 @@
   #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.
  -	 */
  -	convert_flag = ap_checkconv(r);
   	if (d->content_md5 & 1) {
   	    ap_table_setn(r->headers_out, "Content-MD5",
   			  ap_md5digest(r->pool, f, convert_flag));