Subject: | mod_scoreboard_send (apache-2.x) doesn't check if it's configured |
In httpd-2.x, each content handler is invoked, and is responsible for
checking wether it's enabled or not for a given url. That's different
from how 1.3 used to do it.
Currently, if loaded in a httpd-2.x, this module will _always_ kick in
and send the scoreboard, on top of any other content handler. Bad ;-)
Attached patch fixes it.
Subject: | Apache-Scoreboard-handler.patch |
--- Apache-Scoreboard-2.08/apxs/send.c 2005-05-24 10:28:24.000000000 -0700
+++ Apache-Scoreboard-2.08/apxs/send.c 2007-12-28 13:48:19.000000000 -0800
@@ -1,4 +1,5 @@
#define REMOTE_SCOREBOARD_TYPE "application/x-httpd-scoreboard"
+#define HANDLER_NAME "scoreboard-send-handler"
#ifndef Move
#define Move(s,d,n,t) (void)memmove((char*)(d),(char*)(s), (n) * sizeof(t))
@@ -36,6 +37,10 @@
char *ptr = buf;
int server_limit, thread_limit;
+ if (strcmp(r->handler, HANDLER_NAME)) {
+ return DECLINED;
+ }
+
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);