diff -Naur haproxy-1.3.15.7/include/types/global.h haproxy/include/types/global.h
--- haproxy-1.3.15.7/include/types/global.h	2008-12-04 18:29:13.000000000 +0800
+++ haproxy/include/types/global.h	2009-02-17 14:59:54.000000000 +0800
@@ -75,6 +75,7 @@
 extern int  relative_pid;       /* process id starting at 1 */
 extern int  actconn;            /* # of active sessions */
 extern int listeners;
+char *receive;		/* cfgparse.c */
 extern char trash[BUFSIZE];
 extern const int zero;
 extern const int one;
diff -Naur haproxy-1.3.15.7/include/types/proxy.h haproxy/include/types/proxy.h
--- haproxy-1.3.15.7/include/types/proxy.h	2008-12-04 18:29:13.000000000 +0800
+++ haproxy/include/types/proxy.h	2009-02-18 14:52:39.000000000 +0800
@@ -104,6 +104,7 @@
 #define PR_O_CONTSTATS	0x10000000	/* continous counters */
 #define PR_O_HTTP_PROXY 0x20000000	/* Enable session to use HTTP proxy operations */
 #define PR_O_DISABLE404 0x40000000      /* Disable a server on a 404 response to a health-check */
+#define PR_O_HTTP_RECEIVE   0x80000000      /* use HTTP-ECV server health */
 
 /* This structure is used to apply fast weighted round robin on a server group */
 struct fwrr_group {
diff -Naur haproxy-1.3.15.7/src/cfgparse.c haproxy/src/cfgparse.c
--- haproxy-1.3.15.7/src/cfgparse.c	2008-12-04 18:29:13.000000000 +0800
+++ haproxy/src/cfgparse.c	2009-02-18 15:25:49.000000000 +0800
@@ -1285,16 +1285,42 @@
 				curproxy->check_req = (char *)malloc(reqlen);
 				curproxy->check_len = snprintf(curproxy->check_req, reqlen,
 							       "OPTIONS %s HTTP/1.0\r\n\r\n", args[2]); /* URI to use */
-			} else { /* more arguments : METHOD URI [HTTP_VER] */
+			} else { /* more arguments : METHOD URI [RECEIVE <STRING> ]  [HTTP_VER] */
 				int reqlen = strlen(args[2]) + strlen(args[3]) + 3 + strlen("\r\n\r\n");
-				if (*args[4])
-					reqlen += strlen(args[4]);
-				else
-					reqlen += strlen("HTTP/1.0");
+				/* added by KevinKuang(finalbsd@gmail.com */
+				if(!strcmp(args[4], "receive")) {
+					if(*args[5]) { 
+						/* set PR_O_HTTP_RECEIVE */
+						curproxy->options |= PR_O_HTTP_RECEIVE;
+						/* trim the leading and traing " */
+						receive = strdup(args[5]);
+						if(receive[0] == '"') {
+							receive++;
+							receive[strlen(receive)-1] = '\0';
+						}
+					} else { 
+						Alert("You must specify the RECEIVE STRING!\n");
+					}
+
+					if (*args[6])
+						reqlen += strlen(args[6]);
+					else
+						reqlen += strlen("HTTP/1.0");
 		    
-				curproxy->check_req = (char *)malloc(reqlen);
-				curproxy->check_len = snprintf(curproxy->check_req, reqlen,
-							       "%s %s %s\r\n\r\n", args[2], args[3], *args[4]?args[4]:"HTTP/1.0");
+					curproxy->check_req = (char *)malloc(reqlen);
+					curproxy->check_len = snprintf(curproxy->check_req, reqlen,
+							       "%s %s %s\r\n\r\n", args[2], args[3], *args[6]?args[6]:"HTTP/1.0");
+				} else {
+	                                if (*args[4])
+        	                                reqlen += strlen(args[4]);
+                	                else
+                        	                reqlen += strlen("HTTP/1.0");
+
+                                	curproxy->check_req = (char *)malloc(reqlen);
+                                	curproxy->check_len = snprintf(curproxy->check_req, reqlen,
+                                                               "%s %s %s\r\n\r\n", args[2], args[3], *args[4]?args[4]:"HTTP/1.0");
+
+				}
 			}
 		}
 		else if (!strcmp(args[1], "ssl-hello-chk")) {
diff -Naur haproxy-1.3.15.7/src/checks.c haproxy/src/checks.c
--- haproxy-1.3.15.7/src/checks.c	2008-12-04 18:29:13.000000000 +0800
+++ haproxy/src/checks.c	2009-02-18 14:47:34.000000000 +0800
@@ -480,9 +480,17 @@
 			s->result |= SRV_CHK_ERROR;
 			goto out_wakeup;
 		}
-
-		/* check the reply : HTTP/1.X 2xx and 3xx are OK */
-		if (trash[9] == '2' || trash[9] == '3')
+	/* added by KevinKuang(finalbsd@gmail.com) */
+		if(s->proxy->options & PR_O_HTTP_RECEIVE) {
+			char *contentptr = trash;
+			if((contentptr = strstr(trash, "\r\n\r\n")) != NULL )  {
+				contentptr+=4;
+				if(!strncmp(contentptr, receive, strlen(receive)))  
+					s->result |= SRV_CHK_RUNNING;
+				else 
+					s->result |= SRV_CHK_ERROR;
+		 	}
+		} else if (trash[9] == '2')
 			s->result |= SRV_CHK_RUNNING;
 		else if ((s->proxy->options & PR_O_DISABLE404) &&
 			 (s->state & SRV_RUNNING) &&
