Subject: IPP> Desperately seeking info on HTTP servers and CGI scripts

From: Tom Hastings <[email-masked]>
Date: Wed, 4 Dec 1996 16:20:02 PST

Apparently there are a lot of books on HTTP.  However, they have a lot of
detail and it has been reported that it is hard to find out about 
HTTP servers and CGI scripts.

The IPP project has agreed as a goal that the IPP protocol can be implemented
in an HTTP server as a CGI script that interfaces with a printer or print
system using whatever protocol that printer or print system supports so that
no modifications have to be made to the HTTP server, except installing the
CGI script.

Presumably you need a separate CGI script for each such printer or print
system job submission protocol.

So where can we find out more about what CGI scripts are and what kinds
of things can be written in them?  Are there RFCs?  Library books?

We want to prototype the IPP protocol as we develop it.

Thanks,
Tom

---

From: Chuck Adams <[email-masked]>
Date: Wed, 04 Dec 1996 16:45:05 -0800

> of things can be written in them?  Are there RFCs?  Library books?

	I have a copy of "Build a Web Site: The Programmer's
	Guide to Creating, Building and Maintaining a Web 
	Presence" by net.Genesis and Devra Hall, Prima Publishing,
	ISBN: 0-7615-0064-2.  It is an introductory book on
	CGI scripts and WEB sites.

Chuck Adams
Tektronix, Inc.

---

From: Andy Newman <[email-masked]>
Date: Thu, 5 Dec 1996 21:17:16 +1100 (EST)

I been lurking on this list but can offer some assistance here having
implemented a couple of network printers, a few HTTP servers (simple
ones, but HTTP servers nonetheless, including one inside a network
printer) and lots of CGI programs.

> Apparently there are a lot of books on HTTP.

I haven't seen many on HTTP. HTML yes, but that is something completely
different. The NCSA people have CGI documentation at their site,
(http://www/ncsa.uiuc.edu).

> However, they have a lot of detail and it has been reported that it
> is hard to find out about HTTP servers and CGI scripts.

For HTTP there is the HTTP RFC and draft for HTTP/1.1 (is this an RFC yet?)
CGI is quite simple. The server runs an external program with various
environment variables set.

> no modifications have to be made to the HTTP server, except installing the

CGI lets you do that. There may be a need to perform some simple HTTP server
configuration though to indicate that a particular name refers to a CGI
program. That of course is completely outside the domain the the PWG.

> system job submission protocol.

Not necessarially. It depends on how complicated you want to make the CGI
program. Such a program can be completely driven via parameters passed to
it that originate in the URL, e.g., the following URL,

	http://some-host-name/ipp.cgi/printer-1

could be interpreted as a request to use the IPP CGI program. In this
case there is an "argument" to the CGI program which results in the
PATH_INFO environment variable being set to "/printer-1". How PATH_INFO
gets interpretered is entirely up to the CGI program.

Another method of access is to use the QUERY_STRING environment variable
but that is primarially intended for use with forms but almost duplicates
what is possible with PATH_INFO.

> We want to prototype the IPP protocol as we develop it.

A wise move.

Although I won't quote them here several follow-ups to Tom's message
made mention of ISAPI. I haven't looked at it but from all accounts
it is quite straightforward. You should also consider the Apache
HTTP server and it's Fast CGI (another version of the ISAPI-style
server extension where the program runs in the same process as the
server).

One query I did have however was just how much of HTTP is going to
be required by IPP? HTTP/1.1 can be quite a deal to implement in
certain devices (although if you've got a TCP/IP stack already
adding HTTP isn't all that bad I guess).

--
Andy Newman <[email-masked]>