httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenji Miyake <ke...@miyake.org>
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Fri, 08 Sep 2000 14:06:59 GMT
From: Jim Jagielski <jim@jaguNET.com>
Subject: Re: cvs commit: apache-2.0/src/main http_core.c
Date: Fri, 8 Sep 2000 07:47:47 -0400 (EDT)

> Jun Kuriyama wrote:
> > 
> > At 8 Sep 2000 00:35:31 GMT,
> > Jim Jagielski <jim@jaguNET.com> wrote:
> > > I'm wondering if the bug is simply because we're running into
> > > a situation when Apache shouldn't be adding a default, and the
> > > bug reporter thought it should have. For example, if there is
> > > already a charset parameter, then we don't do a thing. If
> > > not, we only handle things if the cntent type is "text/plain" or
> > > "text/html"...
> > 
> > I think these selection is done at make_content_type() in
> > http_protocol.c.  This function make "content-type" as you specify
> > (add "charset" if these is no "charset", and type is "text/plain" or
> > "text/html").
> > 
> > A patch committed is fixing content in "add_default_charset_name", not
> > when it is using.  Old behavior is using "ISO-8859-1" for text/html or
> > text/plain though you specify another string to "AddDefaultCharset".
> > 
> 
> 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 in inheriting process of merge config block.

<Directory /foo>
AddDefaultCharset iso-8859-3
</Directory>

add_default_charset <= ADD_DEFAULT_CHARSET_ON
add_default_charset_name <= iso-8859-3

<Directory /foo/bar>
...no config for AddDefaultCharset...
</Directory>

add_default_charset <= ADD_DEFAULT_CHARSET_UNSET
add_default_charset_name <= DEFAULT_ADD_DEFAULT_CHARSET_NAME(iso-8859-1)

config value evaluate by 'directory_walk' with short directory to long
directory with config value inheritance, but intermediate config
section have not configure AddDefaultCharset then current config
section's add_default_charset_name was overwrite by
DEFAULT_ADD_DEFAULT_CHARSET_NAME even if current config have or have
not configure AddDefaultCharset.

this patch fix them.

> 
> 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.
> 
> That's why I'm confused on how and why and if the patch actually
> fixes the bug, or whether there was a bug.
> 
> -- 
> ===========================================================================
>    Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
>                 "Are you suggesting coconuts migrate??"

Mime
View raw message