W3 server at NIKHEF; Scripst as w3 servers

timbl (Tim Berners-Lee)
Date: Fri, 7 Feb 92 16:40:18 GMT+0100
From: timbl (Tim Berners-Lee)
Message-id: <9202071540.AA00647@ nxoc01.cern.ch >
To: www-talk@nxoc01.cern.ch
Subject: W3 server at NIKHEF;  Scripst as w3 servers

From W.vanLeeuwen@nikhef.nl (Willem van Leeuwen):

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",
	    "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