SOURCES: monit-localhost-http.patch (NEW) - added; allows monit to...

aredridel aredridel at pld-linux.org
Wed Oct 4 18:43:37 CEST 2006


Author: aredridel                    Date: Wed Oct  4 16:43:37 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added; allows monit to monitor lighttpd on localhost (corrects blank Host: header)

---- Files affected:
SOURCES:
   monit-localhost-http.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/monit-localhost-http.patch
diff -u /dev/null SOURCES/monit-localhost-http.patch:1.1
--- /dev/null	Wed Oct  4 18:43:37 2006
+++ SOURCES/monit-localhost-http.patch	Wed Oct  4 18:43:31 2006
@@ -0,0 +1,25 @@
+diff -ur monit-4.8/util.c monit-4.8-n/util.c
+--- monit-4.8/util.c	2006-04-27 14:16:03.000000000 -0600
++++ monit-4.8-n/util.c	2006-10-04 10:35:39.000000000 -0600
+@@ -1738,16 +1738,11 @@
+  * @return the hostBuffer
+  */
+ char *Util_getHTTPHostHeader(Socket_T s, char *hostBuf, int len) {
+-  if(! strcmp(LOCALHOST, socket_get_remote_host(s)) ||
+-     inet_aton(socket_get_remote_host(s), NULL)) {
+-    *hostBuf= 0;
+-  } else {
+-    if(socket_get_remote_port(s)==80)
+-       snprintf(hostBuf, len, "%s", socket_get_remote_host(s));
+-     else
+-       snprintf(hostBuf, len, "%s:%d", socket_get_remote_host(s),
+-                socket_get_remote_port(s));
+-  }
++  if(socket_get_remote_port(s)==80)
++     snprintf(hostBuf, len, "%s", socket_get_remote_host(s));
++   else
++     snprintf(hostBuf, len, "%s:%d", socket_get_remote_host(s),
++              socket_get_remote_port(s));
+   return hostBuf;
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list