diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-05 19:24:33 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-05 19:24:33 +0000 |
commit | 1ccd96fd1f4aa038bb6e5c7419d04915c3586464 (patch) | |
tree | 91e6b78c7319b4bed7c2c0ea0ee3bbbbb1caaa4a /networking/httpd.c | |
parent | d238a477b7491ba4d2cd21f7fa32021e2f755698 (diff) | |
download | busybox-w32-1ccd96fd1f4aa038bb6e5c7419d04915c3586464.tar.gz busybox-w32-1ccd96fd1f4aa038bb6e5c7419d04915c3586464.tar.bz2 busybox-w32-1ccd96fd1f4aa038bb6e5c7419d04915c3586464.zip |
httpd: run interpreter for configured file extensions in any dir,
not only in /cgi-bin/
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) | |||
1701 | sendCgi(url, prequest, length, cookie, content_type); | 1701 | sendCgi(url, prequest, length, cookie, content_type); |
1702 | break; | 1702 | break; |
1703 | } | 1703 | } |
1704 | #if ENABLE_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR | ||
1705 | { | ||
1706 | char *suffix = strrchr(test, '.'); | ||
1707 | if (suffix) { | ||
1708 | Htaccess *cur; | ||
1709 | for (cur = config->script_i; cur; cur = cur->next) { | ||
1710 | if (strcmp(cur->before_colon + 1, suffix) == 0) { | ||
1711 | sendCgi(url, prequest, length, cookie, content_type); | ||
1712 | goto bail_out; | ||
1713 | } | ||
1714 | } | ||
1715 | } | ||
1716 | } | ||
1717 | #endif | ||
1704 | if (prequest != request_GET) { | 1718 | if (prequest != request_GET) { |
1705 | sendHeaders(HTTP_NOT_IMPLEMENTED); | 1719 | sendHeaders(HTTP_NOT_IMPLEMENTED); |
1706 | break; | 1720 | break; |