You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 1998/02/20 12:51:54 UTC

Re: mod_mime/1799: mod_mime's mapping to handler and content_type gets confused by some filenames (fwd)

Paul Sutton wrote:
> 
> On Fri, 20 Feb 1998, Dean Gaudet wrote:
> >           I kind of like the addition of "default", it neatly solves this
> > problem.
> 
> Yep, it sounds a like a great idea. Much better than the old work-around
> xof renaming foo.map.gif to foo.map.x.gif.

I'm not sure I like "default" as the keyword; "AddHandler default" sounds
funny to me, more so than does "AddHandler none".  But this is a feature
I've wanted for many moons (the ability to selectively zap inherited
hander settings), so +1 on the concept.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://WWW.Dummies.Com/

Re: mod_mime/1799: mod_mime's mapping to handler and content_type gets confused by some filenames (fwd)

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Dean Gaudet wrote:
> 
> Imagine my surprise when I looked at the code in mod_mime and saw this:
> 
>     /* Check for overrides with ForceType/SetHandler */
> 
>     if (conf->type && strcmp(conf->type, "none"))
>         r->content_type = pstrdup(r->pool, conf->type);
>     if (conf->handler && strcmp(conf->handler, "none"))
>         r->handler = pstrdup(r->pool, conf->handler);
> 
> What the heck is that *supposed* to do?  It isn't documented...

Um.

Which brings up another issue: are handler names intended to be
case-sensitive?  If so, the fact should be documented.. if not,
some corrective surgery should be done.  I'm happy for them to
be sensitive since it matches rather nicely with method sensitivity
and also slightly reduces the performance hit of comparisons.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://WWW.Dummies.Com/

Re: mod_mime/1799: mod_mime's mapping to handler and content_type gets confused by some filenames (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
Imagine my surprise when I looked at the code in mod_mime and saw this:

    /* Check for overrides with ForceType/SetHandler */

    if (conf->type && strcmp(conf->type, "none"))
        r->content_type = pstrdup(r->pool, conf->type);
    if (conf->handler && strcmp(conf->handler, "none"))
        r->handler = pstrdup(r->pool, conf->handler);

What the heck is that *supposed* to do?  It isn't documented...

Dean

On Fri, 20 Feb 1998, Rodent of Unusual Size wrote:

> Paul Sutton wrote:
> > 
> > On Fri, 20 Feb 1998, Dean Gaudet wrote:
> > >           I kind of like the addition of "default", it neatly solves this
> > > problem.
> > 
> > Yep, it sounds a like a great idea. Much better than the old work-around
> > xof renaming foo.map.gif to foo.map.x.gif.
> 
> I'm not sure I like "default" as the keyword; "AddHandler default" sounds
> funny to me, more so than does "AddHandler none".  But this is a feature
> I've wanted for many moons (the ability to selectively zap inherited
> hander settings), so +1 on the concept.
> 
> #ken	P-)}
> 
> Ken Coar                    <http://Web.Golux.Com/coar/>
> Apache Group member         <http://www.apache.org/>
> "Apache Server for Dummies" <http://WWW.Dummies.Com/
>