httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RCHAPACH Rochester" <rchap...@us.ibm.com>
Subject [PATCH] mod_mime.c
Date Mon, 04 Feb 2002 15:54:10 GMT
In theme with the "broken module" being allowed in ap_directory_walk()
and ap_file_walk(), find_ct() of mod_mime.c needs the following change
to allow a missing filename to pass through to the handlers. I am pretty
sure that DECLINED is the correct return, but I don't think it matters.


Index: mod_mime.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c
retrieving revision 1.76
--- mod_mime.c                    Sat Dec 8 02:02:51 2001
+++ mod_mime.c    Mon Feb  4 09:30:46 2002
@@ -736,6 +736,14 @@
     const char *fn, *type, *charset = NULL;
     int found_metadata = 0;

+    /* To allow broken modules to proceed, we allow missing filenames to
pass.
+     * We will catch it later if it's heading for the core handler.
+     * directory_walk already posted an INFO note for module debugging.
+     */
+    if (!r->filename) {
+        return DECLINED;
+    }
+
     if (r->finfo.filetype == APR_DIR) {
         r->content_type = DIR_MAGIC_TYPE;
         return OK;

Kent Bruinsma
bruinsma@us.ibm.com



Mime
View raw message