Folks,

an absurdly simple patch for httpd.c that provides the often-needed
SERVER_NAME cgi environment variable.

Dunno if I did everything right (eg checking the dependencies), but it
appears to be working.

--- httpd.c     2009-02-26 12:46:24.000000000 +0100
+++ httpd-new.c 2009-03-11 22:52:44.000000000 +0100
@@ -1388,6 +1388,7 @@
               }
       }
       setenv1("HTTP_USER_AGENT", user_agent);
+       setenv1("SERVER_NAME", safe_gethostname());
       if (http_accept)
               setenv1("HTTP_ACCEPT", http_accept);
       if (http_accept_language)


--
Ben
--- httpd.c     2009-02-26 12:46:24.000000000 +0100
+++ httpd-new.c 2009-03-11 22:52:44.000000000 +0100
@@ -1388,6 +1388,7 @@
                }
        }
        setenv1("HTTP_USER_AGENT", user_agent);
+       setenv1("SERVER_NAME", safe_gethostname());
        if (http_accept)
                setenv1("HTTP_ACCEPT", http_accept);
        if (http_accept_language)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to