From 40ceb56432e5b9231c07b00a859b3d6e923411c1 Mon Sep 17 00:00:00 2001 From: vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> Date: Mon, 5 Mar 2007 19:24:33 +0000 Subject: httpd: run interpreter for configured file extensions in any dir, not only in /cgi-bin/ git-svn-id: svn://busybox.net/trunk/busybox@18010 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- networking/httpd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/networking/httpd.c b/networking/httpd.c index 8cf73c2b4..cb8ab763f 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1701,6 +1701,20 @@ static void handleIncoming(void) 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; -- cgit v1.2.3-55-g6feb