httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Kuriyama <kuriy...@imgsrc.co.jp>
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Fri, 08 Sep 2000 14:03:39 GMT

Sorry for my poor explanation...  Please specify if my English
paragraph is difficult to understand and I mis-understand yours.

At 8 Sep 2000 11:48:07 GMT,
Jim Jagielski <jim@jaguNET.com> wrote:
> Yes, I know the intent of the patch, but does it actually _do_ it?
> Again, the old behavior was to update/merge add_default_charset_name
> no matter what (as long as not NULL). The new behavior changes
> it to be updated/merged only if add_default_charset is Off or On.
> But add_default_charset_name is only used if add_default_charset
> is On, so the patch should make no difference at all...

Problem on old behavior is not affected at dir==NULL case.  For
example, when core_dir_config for dir==NULL, it is:

o for dir==NULL
   { add_default_charset = UNSET, add_default_charset_name = "ISO-8859-1" }

And if you specify AddDefaultCharset,

o for dir==NULL
   { add_default_charset = On, add_default_charset_name = "ISO-2022-JP" }

Before processing merge_core_dir_configs(), template for new
core_dir_config is copied from dir==NULL's.

In case which <Directory /> does not have AddDefaultCharset directive,
new core_dir_config is:

o for dir=="/"
   { add_default_charset = UNSET, add_default_charset_name = "ISO-8859-1" }

And with old behavior (always megrge charset_name from new to
template), template is overwritten like this:

o for dir=="/"
   { add_default_charset = On, add_default_charset_name = "ISO-8859-1" }

And with new behavior (merge only if new charset is not UNSET),
template is like this:

o for dir=="/"
   { add_default_charset = On, add_default_charset_name = "ISO-2022-JP" }


I'm sorry, if this is an answer which you want.


> Stepping through, the patch says don't merge if add_default_charset is
> UNSET. But if add_default_charset is UNSET, add_default_charset_name
> isn't used at all, so it shouldn't matter what it is.

Hmmm, is it more consistent to apply this?

Index: http_core.c
===================================================================
RCS file: /home/acvs/apache-2.0/src/main/http_core.c,v
retrieving revision 1.112
diff -u -u -r1.112 http_core.c
--- http_core.c	2000/09/07 23:51:36	1.112
+++ http_core.c	2000/09/08 13:58:02
@@ -319,7 +319,7 @@
 	conf->server_signature = new->server_signature;
     }
 
-    if (new->add_default_charset != ADD_DEFAULT_CHARSET_UNSET) {
+    if (new->add_default_charset != ADD_DEFAULT_CHARSET_ON) {
 	conf->add_default_charset = new->add_default_charset;
 	if (new->add_default_charset_name) {
 	    conf->add_default_charset_name = new->add_default_charset_name;


-- 
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama@FreeBSD.org> // FreeBSD Project

Mime
View raw message