Mailing List Archive

trailing slashes - the haunting
I've got all the latest patches installed, but I see that
Apache and httpd do the following...

open your favourite HTML page, but add a trailing slash

You get back the document you asked for but its content-type
is the the server's default. Our default is text/plain, so
you'll see the source instead of the rendered HTML.

Rob T knows his way around the trailing slash code so well
now that this should be a doddle for him :-)

Not so easy maybe, is fixing it so that relative URLs and
server-side includes also work.


robh
Re: trailing slashes - the haunting [ In reply to ]
From: Rob Hartill <hartill@ooo.lanl.gov>
Date: Tue, 4 Apr 95 17:31:42 MDT

I've got all the latest patches installed, but I see that
Apache and httpd do the following...

open your favourite HTML page, but add a trailing slash

You get back the document you asked for but its content-type
is the the server's default. Our default is text/plain, so
you'll see the source instead of the rendered HTML.

I uploaded three patches to hyperreal, one of which is the trailing
slash fix I emailed to Brian earlier (the third one, which seemed to
actually work) --- details on the three of them below. It also seems
to fix this problem (assuming that the behavior you want is treating
the file as text/html).

(Of course, it'll now turn out that you already tried it...).

Rob T knows his way around the trailing slash code so well
now that this should be a doddle for him :-)

Not so easy maybe, is fixing it so that relative URLs and
server-side includes also work.

Server-side includes seem to be working with B48 as well, at least in
my test Apache build. (The file is correctly processed, and any
scripts that are invoked see PATH_INFO set to "/"). I haven't
actually tried redirects, but I don't see any reason why they
shouldn't work --- they go on prefixes rather than suffixes, anyway.

The three patches I uploaded are:

B48 --- the patch you all saw earlier today, which fixes the /foo.cgi/
bug (and also the spurious lines in error_log generated by
auto-indexing of non-MultiViews directories)

E49 --- Multiviews: Do ignore files with no discernable content type,
rather than assuming the server's DefaultType. Don't ignore
files that are IndexIgnored (unless they also lack a
discernable content-type).

E50 --- Multiviews again --- if you come across 'foo.var' while looking
for variants of 'foo', use that as the map instead of using
the internally generated map.

rst