summaryrefslogtreecommitdiff
path: root/source3/web/cgi.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-02 02:02:30 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-02 02:02:30 +0000
commitb68d65d4bc5de98356863d640ebb3d0985066064 (patch)
tree4c2a9375fc15b970e11749b737d2b1dce3d2441c /source3/web/cgi.c
parent80ec5e4a4de434d267d7c8ca10a5e2627bce80f9 (diff)
downloadsamba-b68d65d4bc5de98356863d640ebb3d0985066064.tar.gz
samba-b68d65d4bc5de98356863d640ebb3d0985066064.tar.bz2
samba-b68d65d4bc5de98356863d640ebb3d0985066064.zip
use /swat/ prefix in both inetd and cgi modes, to enable a static header.html
(This used to be commit ddb788c24d043b18506138a7759b8128df1673aa)
Diffstat (limited to 'source3/web/cgi.c')
-rw-r--r--source3/web/cgi.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 9804f93adf..97dac86668 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -622,8 +622,10 @@ void cgi_setup(char *rootdir, int auth_required)
*p = 0;
}
- if (strstr(url+1,"..")==0 && file_exist(url+1, NULL)) {
- cgi_download(url+1);
+ string_sub(url, "/swat/", "");
+
+ if (strstr(url,"..")==0 && file_exist(url, NULL)) {
+ cgi_download(url);
}
printf("HTTP/1.1 200 OK\r\nConnection: close\r\n");
@@ -645,18 +647,6 @@ char *cgi_baseurl(void)
}
/***************************************************************************
-return the root URL for images etc
- ***************************************************************************/
-char *cgi_rooturl(void)
-{
- if (baseurl) {
- return "/";
- }
- return "/swat/";
-}
-
-
-/***************************************************************************
return the current pages path info
***************************************************************************/
char *cgi_pathinfo(void)