Blob Blame History Raw
Return 500 instead of segfaulting when the application returns no output.
[Tatsuki Sugiura <sugi nemui.org>, Jeff Trawick]

--- mod_fcgid.2.2/fcgid_bridge.c	2007-07-31 10:09:19.000000000 +0100
+++ mod_fcgid.2.2/fcgid_bridge.c	2010-11-05 15:57:35.023098155 +0000
@@ -203,7 +203,7 @@
 	int getLF = 0;
 	int getColon = 0;
 
-	while ((dst < dst_end) && !done && !APR_BUCKET_IS_EOS(e)) {
+	while ((dst < dst_end) && !done && e != APR_BRIGADE_SENTINEL(bb)) {
 		const char *bucket_data;
 		apr_size_t bucket_data_len;
 		const char *src;
@@ -264,7 +264,7 @@
 		e = next;
 	}
 	*dst = 0;
-	return 1;
+	return done;
 }
 
 static int