[BusyBox] Question to httpd

Steven Scholz steven.scholz at imc-berlin.de
Mon Feb 10 07:42:03 UTC 2003


Hi there,

first, httpd does not compile without CONFIG_FEATURE_HTTPD_BASIC_AUTH!
IMHO the reason is a missing #ifdef:

diff -u -r1.3 httpd.c
--- networking/httpd.c  9 Feb 2003 12:46:14 -0000       1.3
+++ networking/httpd.c  10 Feb 2003 14:08:39 -0000
@@ -882,10 +882,13 @@
         "Date: %s\r\nConnection: close\r\n",
           responseNum, responseString, config->found_mime_type, timeStr);

+#ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH
    if (responseNum == HTTP_UNAUTHORIZED) {
      len += sprintf(buf+len, "WWW-Authenticate: Basic realm=\"%s\"\r\n",
                                                             config->realm);
    }
+#endif
+
    if (config->ContentLength != -1) {    /* file */
      strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod));
      len += sprintf(buf+len, "Last-Modified: %s\r\n%s %ld\r\n",

And second,

correct me if I am wrong, but /etc/httpd.conf (i.e. the config file) is only 
used for "ip address filtering and basic authentication" when 
CONFIG_FEATURE_HTTPD_BASIC_AUTH is defined.

So, if I compile httpd withwout CONFIG_FEATURE_HTTPD_BASIC_AUTH there should be 
no need to have a /etc/httpd.conf or to specify a config file. And we don't have 
to call parse_conf() !?!???

Thanks a million,

Steven




More information about the busybox mailing list