httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: AddType...
Date Fri, 05 Jul 1996 21:53:25 GMT
On Fri, 5 Jul 1996, Ben Laurie wrote:

> > The reason is that the parser in mod_mime goes through filenames in
> > dot-seperated sections. i.e. if you have "foo.html.gz" it looks at
> > "html" and then "gz". It's pretty much neccessary to do it this way,
> > if you want to (as we do) allow filename extensions in any order and
> > any number of them. i.e. if you have "AddType whatever .html.gz", how
> > do you parse "foo.gz.en.html" (which is a perfectly legal way of
> > specifying a gzipped English HTML file).
> I don't see that. You seem to be saying that if I add a type for ".tweedledee",
> it doesn't tell you how to deal with ".tweedledum". So what?

Hmm. I think I was trying to combine two problems into one.

1) If you use "AddType whatever html.gz", you're making use of the
   dot, which is a reserved character in the Apache filesystem
   model. So one might think that "gz.html" or "gz.en.html" or whatever
   would amount to the same thing. They wouldn't.

2) The parser looks at, as I said, things in a dot-by-dot basis. If
   you had "foo.html.gz", it looks at "html", then "gz", and would
   never see "html.gz". I don't see a good way to make it work the way
   you want. It just becomes a mess; what if you have
   "foo.html.gz.en"? You end up having to go through every single
   combination, and on a busy site that uses a lot of encoded,
   languaged, handled (I'm making up words as I go along) documents,
   it could really get to be a mess.
The answer really is to just write a module like mod_actions (which is
a very simple module, when you get right down to it) that you can set
to activate only with a content type of "text/html" and a content
encoding of "gzip". After all, that's what the Apache module system's
all about - it's modular.

Alexei Kosut <>      The Apache HTTP Server

View raw message