You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Robert S. Thau" <rs...@ai.mit.edu> on 1995/03/01 22:13:52 UTC

meta-info and redirects on directory indexes.

   From: Rob Hartill <ha...@ooo.lanl.gov>
   Date: Wed, 1 Mar 95 13:08:41 MST

   Re: sending meta info in non-html files..

   We can define a special file type (or group of types) that
   relate to documents which can be treated as if they were
   the output of a cgi-script, so for example, a gif image could
   be embedded into a new file, which contained the HTTP headers
   the user wants sent back to the client. This method requires
   no special file containing headers, so there's no additional
   overhead to go look for it.

I doubt this overhead is terribly significant --- it's a fraction of
the overhead of checking for symlinks and .htaccess files, which most
of us have not chosen to forgo, even though we could.

   The only drawback I see is that the file will no longer be
   a .gif or whatever, which might mean that providers have to
   maintain two copies - for web and non-web applications.

The "non-web applications" would include any editing tools which
applied to the file format in question, as well as players, etc.  If
the data in question are updated frequently, this could get to be a
hassle.

   I think someone mentioned 'fixing' the redirect on a URL
   with a missing '/'. The solution was to send back the correct
   document instead of the redirect. As Tanmoy points out, this
   will break relative URLs.

Actually, it *used* to work this way around httpd 0.5; the Redirects
were added as a workaround for the bug Tanmoy points out.  The 301
response code is a better solution, *if* clients honor it.  (Most of
them honor <BASE>, so they have the machinery --- the question is
whether it 301 responses get at it).

However, this should only be a high-priority item if there's some
server out there which sends a substantial portion of its time sending
out these redirects.  If not, we might as well spend our time
optimizing something that matters more. (FWIW, www.ai.mit.edu dealt
out about 500 redirects from *all* causes yesterday, out of ~112,000
transactions served --- less than 0.5% of all responses got
redirects).  

rst