Date: Sat, 24 Jan 1998 12:00:40 +1100 (EST)
From: Rowan Crowe <rowan@sensation.net.au>
To: "Jeffrey L. Hayes" <tvdog@tvdog.sdi.agate.net>
Subject: Re: REQ: Jaffa WWW server
In-Reply-To: <Pine.LNX.3.91.980123130450.3599G-100000@tvdog.sdi.agate.net>
Message-ID: <Pine.BSF.3.91.980124115001.8271B-100000@velvet.sensation.net.au>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-UIDL: cf0c289bb99d4f2571ec9fc7e03214e9
X-PMFLAGS: 34078848 0

On Fri, 23 Jan 1998, Jeffrey L. Hayes wrote:

> > Grab http://www.rowan.sensation.net.au/www0005.zip, that's the last
> > release I did. Docs are pretty patchy but it should be possible to get it
> > working with a little effort.
>
> Got it, thanks.  A little bit of information on using CGI with it
> would be helpful, if you have the time.

CGI is a bit of an oddity. Currently it only supports .COM programs as
that's what MoonRock generates. Say you had a program called MYPROG.COM
as your CGI program. To tell Jaffa that it's allowed to execute it, you
create a 0 byte flag file called MYPROG.CGI.

Before Jaffa spawns MYPROG.COM, it first creates a file called
CGI-INFO.TMP. This is an example of the contents:

  request request.3
  object /cgi-bin/request
  ident -
  ip 194.231.142.17
  fqdn [194.231.142.17]

In this case, "REQUEST.3" is the file which contains the full request
that the browser sent to the WWW server, eg:

  GET /cgi-bin/request HTTP/1.0
  Connection: Keep-Alive
  User-Agent: Mozilla/2.02 [de] (OS/2; I)
  Host: www2.sensation.net.au
  Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

Use of either file is optional. The only required file is the temporary
HTML file that the CGI program returns. This is passed to the CGI program
on the commandline, so in effect it would be executed like:

  MYPROG.COM 12345678.TMP

MYPROG should then write a complete HTML file to 122345678.TMP (or
whatever filename is passed to it).

I'm running a newer and slightly hacked version of Jaffa: it uses a non
standard way to query my unix box for back resolving IP addresses to
fully qualified domain names. Actually come to think of it, the
"CGI-INFO.TMP" file in your version will probably have less fields in it
because there's no DNS functionality. I'm not entirely sure, been a while
since I've worked on it.

Let me know how you go!

Cheers.


--
Rowan Crowe                     Sensation Internet Services, Melbourne Aust
fidonet: 3:635/728                                        (+61-3)-9388-9260
http://www.rowan.sensation.net.au/             http://www.sensation.net.au/
