httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: Content Negotiation
Date Mon, 06 Mar 1995 15:36:00 GMT
My inclination would be towards having map files. However, I would make the
syntax compatible with server parsed include files, with includes conditional
on the values of the Accept, Accept-Encoding and Accept-Language headers.

So accessing jupiter.shtml could return either jupiter.gif or jupiter.jpg.
If you want the map file not to end in .shtml, then either the x-bit hack or
the .doit approach could be used. Or the server could determine to doc
type from its contents. (I think httpd should be doing this anyway.)

However, I see that if you had a directory containing .gif and .jpeg versions
of many images, it would be tedious to have to create a .shtml map file for
every image. So how about a default wildcard mapping set in the .htaccess
file in the directory? That way, the server would read a per-directory list
of extensions to stat for, rather than having to try everying the browser
accepts.

The other way of solving this is to allow map files to be path components.
So when a browser asks for /adir/images/jupiter, in fact /adir/images
is a map file which selects one of the directories /adir/images.gif or
/adir/images.jpg. So the browser would receive /adir/images.gif/jupiter or
/adir/images.jpg/jupiter.

 David.

Mime
View raw message