You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/04 00:41:02 UTC

cvs commit: apache-2.0/src/modules/standard mod_cgi.c mod_cgid.c

trawick     00/06/03 15:41:01

  Modified:    src      CHANGES
               src/main http_core.c http_protocol.c
               src/modules/standard mod_cgi.c mod_cgid.c
  Log:
  EBCDIC: Rearrange calls to ap_checkconv() so that most handlers
  won't need to call it.
  Submitted by:	Greg Ames, Jeff Trawick
  
  Revision  Changes    Path
  1.131     +3 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- CHANGES	2000/06/03 16:27:02	1.130
  +++ CHANGES	2000/06/03 22:40:57	1.131
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0a4
  +  *) EBCDIC: Rearrange calls to ap_checkconv() so that most handlers
  +     won't need to call it.  [Greg Ames, Jeff Trawick]
  +
     *) Move pre_config hook call to between configuration read and config
        tree walk.  This allows all modules to implement pre_config hooks
        and know that they will be called at an appropriate time.
  
  
  
  1.65      +11 -8     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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- http_core.c	2000/06/03 16:27:03	1.64
  +++ http_core.c	2000/06/03 22:41:01	1.65
  @@ -2416,14 +2416,17 @@
       }
   
   #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.
  -     */
  -    ap_checkconv(r);
  -#endif  
  +    if (d->content_md5 & 1) {
  +        /* The call to ap_checkconv() in ap_send_http_header() is
  +         * sufficient for most paths.  Sending the MD5 digest in a
  +         * header is special in that any change to translation decided
  +         * by ap_checkconv() must be done before building that header,
  +         * and thus before calling ap_send_http_header().
  +         */
  +        ap_checkconv(r);
  +    }
  +#endif /* CHARSET_EBCDIC */
  +      
   #ifdef USE_MMAP_FILES
       if ((r->finfo.size >= MMAP_THRESHOLD)
   	&& (r->finfo.size < MMAP_LIMIT)
  
  
  
  1.76      +14 -0     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.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- http_protocol.c	2000/06/02 15:55:19	1.75
  +++ http_protocol.c	2000/06/03 22:41:01	1.76
  @@ -1641,6 +1641,20 @@
           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
  
  
  
  1.45      +0 -5      apache-2.0/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_cgi.c	2000/06/03 14:31:34	1.44
  +++ mod_cgi.c	2000/06/03 22:41:01	1.45
  @@ -599,11 +599,6 @@
   	    return log_script(r, conf, ret, dbuf, sbuf, script_in, script_err);
   	}
   
  -#ifdef CHARSET_EBCDIC
  -        /* Now check the Content-Type to decide if conversion is needed */
  -        ap_checkconv(r);
  -#endif /*CHARSET_EBCDIC*/
  -
   	location = ap_table_get(r->headers_out, "Location");
   
   	if (location && location[0] == '/' && r->status == 200) {
  
  
  
  1.13      +0 -5      apache-2.0/src/modules/standard/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgid.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_cgid.c	2000/05/27 22:40:36	1.12
  +++ mod_cgid.c	2000/06/03 22:41:01	1.13
  @@ -938,11 +938,6 @@
               return log_script(r, conf, ret, dbuf, sbuf, script, NULL); 
           } 
   
  -#ifdef CHARSET_EBCDIC 
  -        /* Now check the Content-Type to decide if conversion is needed */ 
  -        ap_checkconv(r); 
  -#endif /*CHARSET_EBCDIC*/ 
  -
           location = ap_table_get(r->headers_out, "Location"); 
   
           if (location && location[0] == '/' && r->status == 200) {