mirror of
https://github.com/NishiOwO/ncsa-httpd.git
synced 2025-04-21 08:44:40 +00:00
NCSA HTTPd 1.3R
This commit is contained in:
parent
64a38a3b11
commit
01346b82a2
10
cgi-bin/CVS/Entries
Normal file
10
cgi-bin/CVS/Entries
Normal file
@ -0,0 +1,10 @@
|
||||
/archie/1.1/Thu Feb 16 05:03:10 1995 Tue Dec 7 00:31:38 1993//
|
||||
/calendar/1.1/Thu Feb 16 05:03:10 1995 Tue Dec 7 00:31:39 1993//
|
||||
/date/1.2/Thu Feb 16 05:03:10 1995 Tue Mar 1 12:30:56 1994//
|
||||
/finger/1.2/Thu Feb 16 05:03:10 1995 Tue Mar 1 12:30:58 1994//
|
||||
/fortune/1.2/Thu Feb 16 05:03:11 1995 Tue Mar 1 12:31:00 1994//
|
||||
/nph-test-cgi/1.1/Thu Feb 16 05:03:11 1995 Tue Dec 7 00:31:49 1993//
|
||||
/test-cgi/1.4/Thu Feb 16 05:03:11 1995 Tue Mar 1 12:31:02 1994//
|
||||
/test-cgi.tcl/1.1/Thu Feb 16 05:03:11 1995 Sat Jan 22 20:13:36 1994//
|
||||
/uptime/1.2/Thu Feb 16 05:03:11 1995 Tue Mar 1 12:31:03 1994//
|
||||
/wais.pl/1.2/Thu Feb 16 05:03:12 1995 Sun Apr 10 00:33:29 1994//
|
1
cgi-bin/CVS/Repository
Normal file
1
cgi-bin/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/cgi-bin
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# wais.pl -- WAIS search interface
|
||||
#
|
||||
# wais.pl,v 1.2 1994/04/10 05:33:29 robm Exp
|
||||
# $Id: wais.pl,v 1.2 1994/04/10 05:33:29 robm Exp $
|
||||
#
|
||||
# Tony Sanders <sanders@bsdi.com>, Nov 1993
|
||||
#
|
||||
|
8
cgi-src/CVS/Entries
Normal file
8
cgi-src/CVS/Entries
Normal file
@ -0,0 +1,8 @@
|
||||
/Makefile/1.4/Thu Feb 16 05:03:13 1995 Tue Mar 1 12:31:25 1994//
|
||||
/change-passwd.c/1.2/Thu Feb 16 05:03:14 1995 Sat May 7 21:46:46 1994//
|
||||
/imagemap.c/1.5/Thu Feb 16 05:03:14 1995 Thu Feb 16 04:46:24 1995//
|
||||
/jj.c/1.1/Thu Feb 16 05:03:14 1995 Sun Dec 12 23:18:39 1993//
|
||||
/phf.c/1.2/Thu Feb 16 05:03:15 1995 Tue Mar 1 12:31:28 1994//
|
||||
/post-query.c/1.1/Thu Feb 16 05:03:15 1995 Sun Dec 12 23:18:43 1993//
|
||||
/query.c/1.1/Thu Feb 16 05:03:15 1995 Sun Dec 12 23:18:44 1993//
|
||||
/util.c/1.2/Thu Feb 16 05:03:15 1995 Tue Mar 1 12:31:29 1994//
|
1
cgi-src/CVS/Repository
Normal file
1
cgi-src/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/cgi-src
|
@ -14,6 +14,29 @@
|
||||
** 12/05/93: Rob McCool, robm@ncsa.uiuc.edu
|
||||
**
|
||||
** Made CGI/1.0 compliant.
|
||||
**
|
||||
** 06/27/94: Chris Hyams, cgh@rice.edu
|
||||
** Based on an idea by Rick Troth (troth@rice.edu)
|
||||
**
|
||||
** Imagemap configuration file in PATH_INFO. Backwards compatible.
|
||||
**
|
||||
** Old-style lookup in imagemap table:
|
||||
** <a href="http://foo.edu/cgi-bin/imagemap/oldmap">
|
||||
**
|
||||
** New-style specification of mapfile relative to DocumentRoot:
|
||||
** <a href="http://foo.edu/cgi-bin/imagemap/path/for/new.map">
|
||||
**
|
||||
** New-style specification of mapfile in user's public HTML directory:
|
||||
** <a href="http://foo.edu/cgi-bin/imagemap/~username/path/for/new.map">
|
||||
**
|
||||
** 07/11/94: Craig Milo Rogers, Rogers@ISI.Edu
|
||||
**
|
||||
** Added the "point" datatype. The nearest point wins. Overrides "default".
|
||||
**
|
||||
** 08/28/94: Carlos Varela, cvarela@ncsa.uiuc.edu
|
||||
**
|
||||
** Fixed bug: virtual URLs are now understood.
|
||||
** Better error reporting when not able to open configuration file.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -23,6 +46,7 @@
|
||||
#else
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define CONF_FILE "/usr/local/etc/httpd/conf/imagemap.conf"
|
||||
|
||||
@ -40,6 +64,8 @@ int main(int argc, char **argv)
|
||||
int i, j, k;
|
||||
FILE *fp;
|
||||
char *t;
|
||||
double dist, mindist;
|
||||
int sawpoint = 0;
|
||||
|
||||
if (argc != 2)
|
||||
servererr("Wrong number of arguments, client may not support ISMAP.");
|
||||
@ -55,9 +81,18 @@ int main(int argc, char **argv)
|
||||
*t++ = '\0';
|
||||
testpoint[X] = (double) atoi(argv[1]);
|
||||
testpoint[Y] = (double) atoi(t);
|
||||
|
||||
/*
|
||||
* if the mapname contains a '/', it represents a unix path -
|
||||
* we get the translated path, and skip reading the configuration file.
|
||||
*/
|
||||
if (strchr(mapname,'/')) {
|
||||
strcpy(conf,getenv("PATH_TRANSLATED"));
|
||||
goto openconf;
|
||||
}
|
||||
|
||||
if ((fp = fopen(CONF_FILE, "r")) == NULL)
|
||||
servererr("Couldn't open configuration file.");
|
||||
servererr(strcat("Couldn't open configuration file:", CONF_FILE));
|
||||
|
||||
while(!(getline(input,MAXLINE,fp))) {
|
||||
char confname[MAXLINE];
|
||||
@ -69,8 +104,21 @@ int main(int argc, char **argv)
|
||||
if(!strcmp(confname,mapname))
|
||||
goto found;
|
||||
}
|
||||
if(feof(fp))
|
||||
servererr("Map not found in configuration file.");
|
||||
/*
|
||||
* if mapname was not found in the configuration file, it still
|
||||
* might represent a file in the server root directory -
|
||||
* we get the translated path, and check to see if a file of that
|
||||
* name exists, jumping to the opening of the map file if it does.
|
||||
*/
|
||||
if(feof(fp)) {
|
||||
struct stat sbuf;
|
||||
strcpy(conf,getenv("PATH_TRANSLATED"));
|
||||
if (!stat(conf,&sbuf) && ((sbuf.st_mode & S_IFMT) == S_IFREG))
|
||||
goto openconf;
|
||||
else
|
||||
servererr("Map not found in configuration file.");
|
||||
}
|
||||
|
||||
found:
|
||||
fclose(fp);
|
||||
while(isspace(input[i]) || input[i] == ':') ++i;
|
||||
@ -79,9 +127,10 @@ int main(int argc, char **argv)
|
||||
conf[j] = input[i];
|
||||
conf[j] = '\0';
|
||||
|
||||
openconf:
|
||||
if(!(fp=fopen(conf,"r")))
|
||||
servererr("Couldn't open map file.");
|
||||
|
||||
servererr(strcat("Couldn't open configuration file:", conf));
|
||||
|
||||
while(!(getline(input,MAXLINE,fp))) {
|
||||
char type[MAXLINE];
|
||||
char url[MAXLINE];
|
||||
@ -101,7 +150,7 @@ int main(int argc, char **argv)
|
||||
url[j] = input[i];
|
||||
url[j] = '\0';
|
||||
|
||||
if(!strcmp(type,"default")) {
|
||||
if(!strcmp(type,"default") && !sawpoint) {
|
||||
strcpy(def,url);
|
||||
continue;
|
||||
}
|
||||
@ -141,6 +190,19 @@ int main(int argc, char **argv)
|
||||
if(!strcmp(type,"rect"))
|
||||
if(pointinrect(testpoint,pointarray))
|
||||
sendmesg(url);
|
||||
if(!strcmp(type,"point")) {
|
||||
/* Don't need to take square root. */
|
||||
dist = ((testpoint[X] - pointarray[0][X])
|
||||
* (testpoint[X] - pointarray[0][X]))
|
||||
+ ((testpoint[Y] - pointarray[0][Y])
|
||||
* (testpoint[Y] - pointarray[0][Y]));
|
||||
/* If this is the first point, or the nearest, set the default. */
|
||||
if ((! sawpoint) || (dist < mindist)) {
|
||||
mindist = dist;
|
||||
strcpy(def,url);
|
||||
}
|
||||
sawpoint++;
|
||||
}
|
||||
}
|
||||
if(def[0])
|
||||
sendmesg(def);
|
||||
@ -149,7 +211,13 @@ int main(int argc, char **argv)
|
||||
|
||||
sendmesg(char *url)
|
||||
{
|
||||
printf("Location: %s%c%c",url,10,10);
|
||||
if (strchr(url, ':')) /*** It is a full URL ***/
|
||||
printf("Location: ");
|
||||
else /*** It is a virtual URL ***/
|
||||
printf("Location: http://%s:%s", getenv("SERVER_NAME"),
|
||||
getenv("SERVER_PORT"));
|
||||
|
||||
printf("%s%c%c",url,10,10);
|
||||
printf("This document has moved <A HREF=\"%s\">here</A>%c",url,10);
|
||||
exit(1);
|
||||
}
|
||||
@ -252,3 +320,4 @@ int isname(char c)
|
||||
{
|
||||
return (!isspace(c));
|
||||
}
|
||||
|
||||
|
4
conf/CVS/Entries
Normal file
4
conf/CVS/Entries
Normal file
@ -0,0 +1,4 @@
|
||||
/access.conf-dist/1.4/Thu Feb 16 05:03:17 1995 Wed Jan 19 14:31:27 1994//
|
||||
/httpd.conf-dist/1.4/Thu Feb 16 05:03:17 1995 Fri Mar 11 01:35:03 1994//
|
||||
/mime.types/1.7/Thu Feb 16 05:03:17 1995 Sun Dec 12 21:37:47 1993//
|
||||
/srm.conf-dist/1.10/Thu Feb 16 05:03:17 1995 Mon Apr 11 00:32:19 1994//
|
1
conf/CVS/Repository
Normal file
1
conf/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/conf
|
13
icons/CVS/Entries
Normal file
13
icons/CVS/Entries
Normal file
@ -0,0 +1,13 @@
|
||||
/back.xbm/1.1/Thu Feb 16 05:03:19 1995 Mon Jan 10 21:53:05 1994//
|
||||
/ball.xbm/1.2/Thu Feb 16 05:03:19 1995 Tue Jan 11 06:47:46 1994//
|
||||
/binary.xbm/1.1/Thu Feb 16 05:03:19 1995 Mon Jan 10 21:53:08 1994//
|
||||
/blank.xbm/1.1/Thu Feb 16 05:03:19 1995 Sun Apr 10 22:53:21 1994//
|
||||
/ftp.xbm/1.1/Thu Feb 16 05:03:19 1995 Mon Jan 10 21:53:09 1994//
|
||||
/image.xbm/1.2/Thu Feb 16 05:03:20 1995 Tue Jan 11 06:47:47 1994//
|
||||
/index.xbm/1.1/Thu Feb 16 05:03:20 1995 Mon Jan 10 21:53:11 1994//
|
||||
/menu.xbm/1.1/Thu Feb 16 05:03:20 1995 Mon Jan 10 21:53:12 1994//
|
||||
/movie.xbm/1.1/Thu Feb 16 05:03:20 1995 Mon Jan 10 21:53:13 1994//
|
||||
/sound.xbm/1.1/Thu Feb 16 05:03:20 1995 Mon Jan 10 21:53:15 1994//
|
||||
/telnet.xbm/1.1/Thu Feb 16 05:03:20 1995 Mon Jan 10 21:53:16 1994//
|
||||
/text.xbm/1.1/Thu Feb 16 05:03:21 1995 Mon Jan 10 21:53:17 1994//
|
||||
/unknown.xbm/1.2/Thu Feb 16 05:03:21 1995 Wed Jan 12 04:21:28 1994//
|
1
icons/CVS/Repository
Normal file
1
icons/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/icons
|
0
logs/CVS/Entries
Normal file
0
logs/CVS/Entries
Normal file
1
logs/CVS/Repository
Normal file
1
logs/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/logs
|
19
src/CVS/Entries
Normal file
19
src/CVS/Entries
Normal file
@ -0,0 +1,19 @@
|
||||
/Makefile/1.19/Thu Feb 16 05:03:23 1995 Sat May 7 21:46:59 1994//
|
||||
/http_access.c/1.22/Thu Feb 16 05:03:23 1995 Sat May 7 21:47:00 1994//
|
||||
/http_alias.c/1.8/Thu Feb 16 05:03:23 1995 Wed Jan 19 14:31:47 1994//
|
||||
/http_auth.c/1.19/Thu Feb 16 05:03:24 1995 Sun Apr 10 00:36:44 1994//
|
||||
/http_config.c/1.34/Thu Feb 16 05:03:24 1995 Sat May 7 21:47:01 1994//
|
||||
/http_delete.c/1.2/Thu Feb 16 05:03:24 1995 Sun Apr 10 00:36:47 1994//
|
||||
/http_dir.c/1.16/Thu Feb 16 05:03:24 1995 Sat May 7 22:02:07 1994//
|
||||
/http_get.c/1.17/Thu Feb 16 05:03:25 1995 Sat May 7 21:47:04 1994//
|
||||
/http_include.c/1.2/Thu Feb 16 05:03:25 1995 Sat May 7 21:47:05 1994//
|
||||
/http_log.c/1.18/Thu Feb 16 05:03:25 1995 Sat May 7 22:37:50 1994//
|
||||
/http_mime.c/1.24/Thu Feb 16 05:03:25 1995 Sat May 7 21:47:08 1994//
|
||||
/http_post.c/1.1/Thu Feb 16 05:03:26 1995 Fri Mar 11 01:35:24 1994//
|
||||
/http_put.c/1.1/Thu Feb 16 05:03:26 1995 Fri Mar 11 01:36:08 1994//
|
||||
/http_request.c/1.30/Thu Feb 16 05:03:26 1995 Sat May 7 21:47:09 1994//
|
||||
/http_script.c/1.12/Thu Feb 16 05:03:26 1995 Sat May 7 21:47:10 1994//
|
||||
/httpd.c/1.25/Thu Feb 16 05:03:26 1995 Sat May 7 21:47:11 1994//
|
||||
/httpd.h/1.42/Thu Feb 16 05:03:27 1995 Sat May 7 21:47:12 1994//
|
||||
/rfc931.c/1.2/Thu Feb 16 05:03:27 1995 Sat May 7 21:47:14 1994//
|
||||
/util.c/1.27/Thu Feb 16 05:03:27 1995 Thu Feb 16 04:44:02 1995//
|
1
src/CVS/Repository
Normal file
1
src/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/src
|
14
src/util.c
14
src/util.c
@ -158,11 +158,17 @@ int is_matchexp(char *str) {
|
||||
|
||||
void strsubfirst(int start,char *dest, char *src)
|
||||
{
|
||||
char tmp[MAX_STRING_LEN];
|
||||
int src_len, dest_len, i;
|
||||
|
||||
strcpy(tmp,&dest[start]);
|
||||
strcpy(dest,src);
|
||||
strcpy(&dest[strlen(src)],tmp);
|
||||
if ((src_len=strlen(src))<start){ /** src "fits" in dest **/
|
||||
for (i=0;dest[i]=src[i];i++);
|
||||
for (i=src_len;dest[i]=dest[i-src_len+start];i++);
|
||||
}
|
||||
else { /** src doesn't fit in dest **/
|
||||
for (dest_len=strlen(dest),i=dest_len+src_len-start;i>=src_len;i--)
|
||||
dest[i] = dest[i-src_len+start];
|
||||
for (i=0;i<src_len;i++) dest[i]=src[i];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
5
support/CVS/Entries
Normal file
5
support/CVS/Entries
Normal file
@ -0,0 +1,5 @@
|
||||
/Makefile/1.8/Thu Feb 16 05:03:28 1995 Sun Apr 10 23:58:14 1994//
|
||||
/change-passwd.readme/1.1/Thu Feb 16 05:03:28 1995 Sat Jan 22 20:22:09 1994//
|
||||
/htpasswd.c/1.8/Thu Feb 16 05:03:29 1995 Sat May 7 22:46:48 1994//
|
||||
/inc2shtml.c/1.2/Thu Feb 16 05:03:29 1995 Mon Apr 11 00:32:35 1994//
|
||||
/unescape.c/1.4/Thu Feb 16 05:03:29 1995 Sun Dec 12 01:39:44 1993//
|
1
support/CVS/Repository
Normal file
1
support/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/support
|
6
support/auth/CVS/Entries
Normal file
6
support/auth/CVS/Entries
Normal file
@ -0,0 +1,6 @@
|
||||
/pgp-dec/1.3/Thu Feb 16 05:03:30 1995 Mon Jan 24 15:42:16 1994//
|
||||
/pgp-enc/1.3/Thu Feb 16 05:03:30 1995 Mon Jan 24 15:42:19 1994//
|
||||
/ripem-dec/1.4/Thu Feb 16 05:03:31 1995 Mon Jan 24 15:42:21 1994//
|
||||
/ripem-enc/1.3/Thu Feb 16 05:03:31 1995 Mon Jan 24 15:42:22 1994//
|
||||
/uudecode.c/1.1/Thu Feb 16 05:03:31 1995 Wed Jan 12 05:12:58 1994//
|
||||
/uuencode.c/1.1/Thu Feb 16 05:03:31 1995 Wed Jan 12 05:13:00 1994//
|
1
support/auth/CVS/Repository
Normal file
1
support/auth/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
/X11/mosaic/cvsroot/httpd/support/auth
|
Loading…
x
Reference in New Issue
Block a user