650fe4835e4a70b5226ad471c025bda632448d65
[catagits/fcgi2.git] / examples / tiny-tcl-fcgi
1 #!./tclsh
2 #
3 #  tiny-tcl-fcgi --
4
5 #       Tcl FastCGI example program
6
7 # Copyright (c) 1996 Open Market, Inc.
8 #
9 # See the file "LICENSE.TERMS" for information on usage and redistribution
10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11
12 #  $Id: tiny-tcl-fcgi,v 1.1 1997/09/16 15:36:29 stanleyg Exp $
13 #
14
15 set count 0 
16 while {[FCGI_Accept] >= 0 } {
17     incr count
18     puts -nonewline "Content-type: text/html\r\n\r\n"
19     puts "<title>FastCGI Hello! (Tcl)</title>"
20     puts "<h1>FastCGI Hello! (Tcl)</h1>"
21     puts "Request number $count running on host <i>$env(SERVER_NAME)</i>"
22 }