You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by CaT <ca...@zip.com.au> on 2000/08/16 05:43:06 UTC
Re: mod_autoindex/4991: HEADER and README files are not displaying with index listings, even though correct permissions on files and dirs is evident, and , httpd.conf is configured to allow their loading.
Whoa. Long subject line but I think I got it. :)
Anyhow, I found the bug also and made the patch beneath. Having looked
through the bug db I found #4991 which doesn't appear closed so here
goes. :)
Reasoning: I placed the fix in the function ap_find_types. It was put
there due to the fact that I figured that since the defaulttype means
that all files that do not have an explicit type get the default type
there should be no typeless files around and as near as I can tell
this is the fucntiona pache uses for type finding. If this is not
the right call then a similar variant of the patch would go into
mod_autoindex.c (though this looks to be a wee bit more complicated)
Anyhow, this is the patch against apache 1.3.12:
--- 8< ---
--- src/main/http_config.c.old Wed Aug 16 11:33:14 2000
+++ src/main/http_config.c Wed Aug 16 11:33:25 2000
@@ -379,7 +379,12 @@
int ap_find_types(request_rec *r)
{
- return run_method(r, offsets_into_method_ptrs.type_checker, 0);
+ int retval;
+
+ retval = run_method(r, offsets_into_method_ptrs.type_checker, 0);
+ if(retval == OK && r->content_type == NULL)
+ r->content_type = ap_default_type(r);
+ return retval;
}
int ap_run_fixups(request_rec *r)
--- 8< ---
I hope this is right. It certainly makes the problem go away for me.
Also, I hope I've mailed it to the right place. ATM am trying to get
myself subscribed to the new-httpd mailing list but I haven't heard
anything fromt he mailing list server yet so am getting impatient. :)
It's fun when you think you've squished a bug. :)
--
CaT (cat@zip.com.au)
'He had position, but I was determined to score.'
-- Worf, DS9, Season 5: 'Let He Who Is Without Sin...'