]> granicus.if.org Git - apache/commit
Fix subreqs with non-defined Content-Types being served improperly.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 17 Apr 2002 04:09:07 +0000 (04:09 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 17 Apr 2002 04:09:07 +0000 (04:09 +0000)
commit15e95dc9f316ed5a11c48abf49d4cb1e50098243
tree91c61ede40282c5c2dbbd44e5cdc91297191ca8d
parent4418cb48f6a311c06a35e2e17e62bcca81512916
Fix subreqs with non-defined Content-Types being served improperly.

If we do not know a C-T for a subreq, we *must* propogate that
non-knowledge upwards to the main request.

Previously, if you used a DirectoryIndex with a file without a C-T (say
.shtml without AddType), the r->content_type will be kept as
httpd/unix-directory when we promoted the subreq in mod_dir.  Since there
would be no handler on this file, ap_invoke_handler (config.c:355) would
set the handler to be httpd/unix-directory (which was the old C-T of the
dir).  This would then trigger the handler to become httpd/unix-directory.
mod_autoindex would then try to serve the request.  But, the filename
was propogated upwards by mod_dir's DirectoryIndex via
internal_fast_redirect - it would then return a 403 trying to generate a
mod_autoindex page for a file.

Now, we will use ap_default_type() which is correct.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94676 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
modules/http/http_protocol.c
modules/http/http_request.c