[BusyBox] Question to httpd

Vladimir N. Oleynik dzo at simtreas.ru
Mon Feb 10 08:51:03 UTC 2003


Steven,

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

Thanks.
 
> 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.

No.
IP checking as checkperm(NULL, config->rmt_ip)

> 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() !?!???

Why?


Last patch also have one small correting.
I use this applet from real project. Very tested.


--w
vodz
-------------- next part --------------
diff -ru busybox.orig/networking/httpd.c busybox/networking/httpd.c
--- busybox.orig/networking/httpd.c	Mon Feb 10 18:39:23 2003
+++ busybox/networking/httpd.c	Mon Feb 10 18:41:21 2003
@@ -882,10 +882,12 @@
 	"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",
@@ -1519,7 +1521,6 @@
 	if(length < 0)          // closed
 		length = 0;
 	body[length] = 0;       // always null terminate for safety
-	urlArgs = body;
       }
     }
 


More information about the busybox mailing list