# This patch avoids clearing the environment, so it is exported to the CGIs

--- networking/httpd.c	2007-06-16 15:35:15.000000000 +0200
+++ networking/httpd.c	2007-06-16 15:37:34.000000000 +0200
@@ -1179,7 +1179,7 @@
 	while (1) {
 		fd_set readSet;
 		fd_set writeSet;
-		char wbuf[128];
+		char wbuf[4096];
 		int nfound;
 		int count;
 
@@ -1885,6 +1885,8 @@
 
 		if (DEBUG || fork() == 0) {
 			/* child */
+			if (!DEBUG)
+				close(server);
 #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
 			/* protect reload config, may be confuse checking */
 			signal(SIGHUP, SIG_IGN);
@@ -2051,7 +2053,7 @@
 	{
 		char *p = getenv("PATH");
 		/* env strings themself are not freed, no need to strdup(p): */
-		clearenv();
+		//clearenv();
 		if (p)
 			putenv(p - 5);
 		if (!(opt & OPT_INETD))
