W3 server at NIKHEF; Scripst as w3 servers

Tim Berners-Lee (timbl)
Fri, 7 Feb 92 16:40:18 GMT+0100


I installed the server on our recently installed network sun (nic.nikhef.nl).
With a very crude change in HTRetrieve it is possible to activate
a script in case of a keyword search:

/* Handle a Retrieve request from a WWW client HTRetrieve.c
...
extern int HTWriteASCII(int soc, char * s); /* In HTDaemon.c */

char *command;
char string[80];
char *ip;

/* Read a file
...
if (keywords) {
/*
if (TRACE) fprintf(logfile,"HTHandle: can't perform search %s\n",
arg);
HTWriteASCII(soc,
"Sorry, this server does not perform searches.\n");
*/
ip = string;
command = "/user/a03/bin/WWWsh ";
for (;*command!='\0';) *ip++ = *command++;
for (;*arg!='\0';) *ip++ = *arg++;
*ip++ = '?';
for (;*keywords!='\0';) *ip++ = *keywords++;
system (string);
return fd;
}

StrAllocCopy(arg2, arg);
...

With the following script the finger information is sent to the client:

name=`echo $@ | awk -F? '{print $2}`
echo '<plaintext>'
/usr/ucb/finger $name@nikhefh

This script only serves to demonstrate that this solution works.

Our default file is //nic.nikhef.nl./user/a03/www/default/default.html
but we are still experimenting so it is too early to hook nikhef into WWW.
I'll let you know when we have more useful information.

Best regards,
Willem van Leeuwen