httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Wed, 26 Jun 2002 18:34:00 GMT
coar        2002/06/26 11:34:00

  Modified:    src/main http_protocol.c
  Log:
  	Style police; there appears to be a bug in here somewhere
  	(see bugzilla #10259), and I want to get the code style
  	fix out of the way first.
  
  Revision  Changes    Path
  1.322     +15 -7     apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.321
  retrieving revision 1.322
  diff -u -u -r1.321 -r1.322
  --- http_protocol.c	21 Jun 2002 09:09:15 -0000	1.321
  +++ http_protocol.c	26 Jun 2002 18:34:00 -0000	1.322
  @@ -123,25 +123,33 @@
   	"text/html",
   	NULL };
       char **pcset;
  -    core_dir_config *conf = (core_dir_config *)ap_get_module_config(
  -	r->per_dir_config, &core_module);
  -    if (!type) type = ap_default_type(r);
  -    if (conf->add_default_charset != ADD_DEFAULT_CHARSET_ON) return type;
  +    core_dir_config *conf;
  +
  +    conf = (core_dir_config *)ap_get_module_config(r->per_dir_config,
  +                                                   &core_module);
  +    if (!type) {
  +        type = ap_default_type(r);
  +    }
  +    if (conf->add_default_charset != ADD_DEFAULT_CHARSET_ON) {
  +        return type;
  +    }
   
       if (ap_strcasestr(type, "charset=") != NULL) {
   	/* already has parameter, do nothing */
   	/* XXX we don't check the validity */
   	;
  -    } else {
  +    }
  +    else {
       	/* see if it makes sense to add the charset. At present,
   	 * we only add it if the Content-type is one of needcset[]
   	 */
  -	for (pcset = needcset; *pcset ; pcset++)
  +	for (pcset = needcset; *pcset ; pcset++) {
   	    if (ap_strcasestr(type, *pcset) != NULL) {
   		type = ap_pstrcat(r->pool, type, "; charset=", 
  -		    conf->add_default_charset_name, NULL);
  +                                  conf->add_default_charset_name, NULL);
   		break;
   	    }
  +        }
       }
       return type;
   }
  
  
  

Mime
View raw message