]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Some syntax errors in mod_mime_magic's magic file can result
authorJeff Trawick <trawick@apache.org>
Tue, 13 Jan 2004 21:03:06 +0000 (21:03 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 13 Jan 2004 21:03:06 +0000 (21:03 +0000)
in a 500 error, which previously was unlogged.  Now we log the
error.

Submitted by: Jeff Trawick
Reviewed by: Jim Jagielski, Martin Kraemer

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@102326 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/standard/mod_mime_magic.c

index b4ee3e2b9f9a31ce0a251c2edafe6823c650e2a2..7728e1fa73c0ebc6abb75bab777a6b7817cbaf8c 100644 (file)
@@ -1,5 +1,9 @@
 Changes with Apache 1.3.30
 
+  *) Some syntax errors in mod_mime_magic's magic file can result
+     in a 500 error, which previously was unlogged.  Now we log the
+     error.  [Jeff Trawick]
+
   *) Linux 2.4+: If Apache is started as root and you code
      CoreDumpDirectory, coredumps are enabled via the prctl() syscall.
      Backport of a 2.x feature by Greg Ames.  [Jeff Trawick]
index 0c81ce7ce01625dc0a2b6485d6e3c8ab95f08a78..a36012d890338497ac5a92b0094adb94ad7c8783 100644 (file)
@@ -832,9 +832,13 @@ static int magic_rsl_to_request(request_rec *r)
        r->content_encoding = tmp;
     }
 
-    /* detect memory allocation errors */
+    /* detect memory allocation or other errors */
     if (!r->content_type ||
        (state == rsl_encoding && !r->content_encoding)) {
+        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+                      MODNAME ": unexpected state %d; could be caused by bad "
+                      "data in magic file",
+                      state);
        return HTTP_INTERNAL_SERVER_ERROR;
     }