www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cat <...@zip.com.au>
Subject mod_autoindex/6453: See bug report #4991 - ReadmeName not being applied
Date Wed, 23 Aug 2000 05:28:56 GMT

>Number:         6453
>Category:       mod_autoindex
>Synopsis:       See bug report #4991 - ReadmeName not being applied
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Aug 22 22:30:00 PDT 2000
>Originator:     cat@zip.com.au
>Release:        1.3.12
Linux tycho 2.2.17pre13 #13 Fri Jul 21 17:54:15 EST 2000 i586 unknown
gcc 2.95.2
glibc 2.1.3
GNU ld version 2.9.4 (with BFD
Bug report #4991 has the full details. Basically though, DefaultTYpe is not
being applied to ReadmeName and as such the file is not being displayed.
Use the apache supplied value for ReadmeName and try to view a directory with it.
Yes. :) I've tried emailing this and joining httpd-new and stuff but everything
I've tried appears to have failed so this is my option of last resort. Anyhow...
onto the fix.

This patch is based around the conclusion that ap_find_types is what is used globally
to find the type of a file. This is also what the code for ReadmeName uses and it
does not appear to posses any logic wrt DefaultType and so to solve this problem
I decided to put some logic in there as the presence of DefaultType indicates to
me that there should be no file without a type. If it hasn't got anything specific
set it should get the DefaultType type.

Anyways, the patch is very simple and I believe correct (obviously) but if you
folks find fault with it, please holler. I'd like to know of a beter solution
if it exists. :) Ofcourse, if it's right, please holler also. Any questions and
ditto. :)

But for now... the patch:

--- 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)
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message