svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Mon Mar 5 19:24:34 UTC 2007


Author: vda
Date: 2007-03-05 11:24:33 -0800 (Mon, 05 Mar 2007)
New Revision: 18010

Log:
httpd: run interpreter for configured file extensions in any dir,
not only in /cgi-bin/


Modified:
   trunk/busybox/networking/httpd.c


Changeset:
Modified: trunk/busybox/networking/httpd.c
===================================================================
--- trunk/busybox/networking/httpd.c	2007-03-05 19:22:04 UTC (rev 18009)
+++ trunk/busybox/networking/httpd.c	2007-03-05 19:24:33 UTC (rev 18010)
@@ -1701,6 +1701,20 @@
 			sendCgi(url, prequest, length, cookie, content_type);
 			break;
 		}
+#if ENABLE_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
+		{
+			char *suffix = strrchr(test, '.');
+			if (suffix) {
+				Htaccess *cur;
+				for (cur = config->script_i; cur; cur = cur->next) {
+					if (strcmp(cur->before_colon + 1, suffix) == 0) {
+						sendCgi(url, prequest, length, cookie, content_type);
+						goto bail_out;
+					}
+				}
+			}
+		}
+#endif
 		if (prequest != request_GET) {
 			sendHeaders(HTTP_NOT_IMPLEMENTED);
 			break;




More information about the busybox-cvs mailing list