httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject [PATCH] whine if handler not found
Date Mon, 16 Mar 1998 05:15:19 GMT
This patch adds a whine to default_handler so that if a specific handler
is set for a file, but it ends up in default_handler anyway because
nothing else is found, it whines.

The idea is that right now "AddHandler heymoron .moron" will just end up
serving the files as normal and can confuse people a lot if they think
they have mod_moron compiled in but they don't.

I am posting this because I am leery of some of the things that some
modules may do with this so-called API of ours, so if anyone can think of
any cases where this will warn when it shouldn't...

Index: http_core.c
RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
retrieving revision 1.171
diff -u -r1.171 http_core.c
--- http_core.c	1998/03/15 04:39:12	1.171
+++ http_core.c	1998/03/16 05:12:32
@@ -2046,6 +2046,12 @@
     caddr_t mm;
+    if (r->handler) {
+	    r->server, "handler \"%s\" not found, using default "
+	    "handler for: %s", r->handler, r->filename);
+    }
     /* This handler has no use for a request body (yet), but we still
      * need to read and discard it if the client sent one.

View raw message