FastCGI and Tcl 7.5

Tom Wood (tom.wood@freegate.net)
Wed, 23 Oct 1996 11:06:39 -0700

Message-Id: <01BBC0D2.44396D60@ws24.freegate.net>
From: Tom Wood <tom.wood@freegate.net>
To: "'FastCGI Developers'" <fastcgi-developers@openmarket.com>
Subject: FastCGI and Tcl 7.5
Date: Wed, 23 Oct 1996 11:06:39 -0700

The  FCGI development kit I grabbed recently appears to include support for Tcl 7.4 ... will this support work for
Tcl 7.5?  (I am guessing not.)  Is it possible to use FCGI with Tcl 7.5?

On a related topic, I would love to see the Tcl support packaged as dynamically loaded extension which would
not require recompiling the whole Tcl interpreter.  I realize that this would mean a change or addition to the
Tcl "binding", since one would lose the stdio chicanery.  But I would be very happy with code that looked like
this:

	while { [ FCGI_Accept] >= 0 } {
	     set inChannel [ FCGI_Stdin ]
	     set outChannel [ FCGI_Stdout ]

	     puts $outChannel "Content-type: text/html"
	     # etc, etc
	}

if it meant I could use a "stock" Tcl interpreter (since I want to use other Tcl extensions in addition to FastCGI!)

The channel support in Tcl 7.5 seems ideal (to my untrained eye) for this situation.

Note that the above code could easily be run in a non-FastCGI environment by just stubbing some of the FCGI_*
procedures:

	proc FCGI_Stdin {} { return stdin }
	proc FCGI_Stdout {} { return stdout }

etc., etc.

-Tom Wood