summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2001-10-27 15:36:57 +0200
committerJeff Trawick <trawick@apache.org>2001-10-27 15:36:57 +0200
commit5e0e741377a98d0bc522e2fb2ab0d9cc2cf2b0ef (patch)
tree1a4ba641bd539797b8a59cdc1a862ba0e740e4e4 /modules
parentignore checkgid (diff)
downloadapache2-5e0e741377a98d0bc522e2fb2ab0d9cc2cf2b0ef.tar.xz
apache2-5e0e741377a98d0bc522e2fb2ab0d9cc2cf2b0ef.zip
Some syntax errors in mod_mime_magic's magic file can result
in a 500 error. Log the error so that it isn't so darn mysterious. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/metadata/mod_mime_magic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c
index 564018e69c..6f1f039ab7 100644
--- a/modules/metadata/mod_mime_magic.c
+++ b/modules/metadata/mod_mime_magic.c
@@ -845,9 +845,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, 0, r,
+ MODNAME ": unexpected state %d; could be caused by bad "
+ "data in magic file",
+ state);
return HTTP_INTERNAL_SERVER_ERROR;
}