httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject Re: Patches to handle content-language
Date Mon, 17 Jul 1995 22:37:52 GMT
On Mon, 17 Jul 1995, Florent Guillaume wrote:
> What follows is a patch for Apache 0.8.0 (and Shambhala) that enables
> consistent handling of content-language with MultiViews.
> (The new behaviour is much closer to what you can have using CERN's httpd.)
> Previously, if you wanted to handle files in several languages, you
> were obliged to have a .var file for each, because mod_mime.c didn't
> know what Content-Language was and so didn't type on language.
> I added a per-directory directive AddLanguage which is very similar to
> AddEncoding : it takes a language and a suffix. For example my srm.conf has
> AddLanguage fr .fr
> AddLanguage en .en
> AddLanguage de .de
> Mod_mime.c now recognizes filenames of the form
> basename.type.lang.encoding, for example is
> correctly typed as text/html with language=fr and encoding=x-gzip.  The
> Content-Language is stored in a new field in request_rec, exactly like
> the Content-Encoding.

I really like this, but what resolves name collisions and missing 
info between type, lang, and encoding?  For example, if I decide to name 
all my Framemaker documents .fr, what happens to  If type, lang, and encoding shared the 
same namespace, *no* problem.  In this case, we're using filename 
extensions to indicate meta-information other than content-type, which 
I'm certainly comfortable with, but the collision issue should be 
resolved somehow.

Also, it would be tremendous if I could have the flexibility to negotiate 
on file type and language and encoding by specifying only the meta-info I 
want in the filename - in other words, lets say I have documents in all 
the possible variations of


Right now with content-negotiation, if I have an index.html and an 
index.html3, then I can simply point a resource locator to "index" and 
negotiation happens, but I can also defeat negotiation by explicitly 
linking to "index.html3" if I wanted to make sure someone got the 3.0 

Let's say for the above 9 versions of the document I wanted to 
be able to specify which variables are mandatory.  If I didn't care at 
all which document was fetched, I'd create a link to "basename".  If I 
wanted specifically the gzip'd french PDF, I'd make a link to 
"".  Now, let's say I want to make a link to all 
french variants explicit, yet let the client/server negotiate on their 
own as to encoding and content-type preferences.  I'd like to then link 
to "".  Or, I specifically want the uuencoded PDF's, but I 
don't care what language: "basename.pdf.gz".  

Thoughts?  If we ensure there's no namespace collisions between mime 
type extensions and filename extensions and encoding extension then this 
is easy.  If not....


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--  http://www.[hyperreal,organic].com/

View raw message