From: roberts Date: Fri, 10 Sep 1999 17:45:40 +0000 (+0000) Subject: Remove the Perl and TCL examples; examples exist in their respective directories. X-Git-Tag: 0.67_01~349 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=773280a2083853698767cc0001b978845baabab6;p=catagits%2Ffcgi2.git Remove the Perl and TCL examples; examples exist in their respective directories. --- diff --git a/examples/echo-perl b/examples/echo-perl deleted file mode 100755 index f8762d6..0000000 --- a/examples/echo-perl +++ /dev/null @@ -1,54 +0,0 @@ -#!./perl -# -# echo-perl -- -# -# Produce a page containing all FastCGI inputs -# -# Copyright (c) 1996 Open Market, Inc. -# -# See the file "LICENSE.TERMS" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# $Id: echo-perl,v 1.1 1997/09/16 15:36:28 stanleyg Exp $ -# - -use FCGI; - -sub print_env { - my($label, $envp) = @_; - print("$label:
\n
\n");
-    my @keys = sort keys(%$envp);
-    foreach $key (@keys) {
-        print("$key=$$envp{$key}\n");
-    }
-    print("

\n"); -} - -while (($key, $val) = each %ENV) { - $initialEnv{$key} = $val; -} -$count = 0; -while(FCGI::accept() >= 0) { - print("Content-type: text/html\r\n\r\n", - "FastCGI echo (Perl)\n", - "

FastCGI echo (Perl)

\n", - "Request number ", ++$count, "

\n"); - $len = 0 + $ENV{'CONTENT_LENGTH'}; - if($len == 0) { - print("No data from standard input.

\n"); - } else { - print("Standard input:
\n

\n");
-        for($i = 0; $i < $len; $i++) {
-            $ch = getc(STDIN);
-            if($ch eq "") {
-                print("Error: Not enough bytes received ",
-                      "on standard input

\n"); - last; - } - print($ch); - } - print("\n

\n"); - } - print_env("Request environment", \%ENV); - print_env("Initial environment", \%initialEnv); -} diff --git a/examples/echo-tcl b/examples/echo-tcl deleted file mode 100755 index d7065c2..0000000 --- a/examples/echo-tcl +++ /dev/null @@ -1,56 +0,0 @@ -#!./tclsh -# -# echo-tcl -- -# -# Produce a page containing all FastCGI inputs -# -# Copyright (c) 1996 Open Market, Inc. -# -# See the file "LICENSE.TERMS" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# $Id: echo-tcl,v 1.1 1997/09/16 15:36:28 stanleyg Exp $ -# - -proc printEnv {label envArrayName} { - upvar $envArrayName envArray - puts "$label:
\n

"
-    foreach name [lsort [array names envArray]] {
-        puts "$name=$envArray($name)"
-    }
-    puts "

" -} - -foreach name [array names env] { - set initialEnv($name) $env($name) -} -set count 0 -while {[FCGI_Accept] >= 0 } { - incr count - puts -nonewline "Content-type: text/html\r\n\r\n" - puts "FastCGI echo (Tcl)" - puts "

FastCGI echo (Tcl)

" - puts "Request number $count

" - if [info exists env(CONTENT_LENGTH)] { - set len $env(CONTENT_LENGTH) - } else { - set len 0 - } - if {$len == 0} { - puts "No data from standard input.

" - } else { - puts "Standard input:
\n

"
-        for {set i 0} {$i < $len} {incr i} {
-            set ch [read stdin 1]
-            if {$ch == ""} {
-                puts -nonewline "Error: Not enough bytes received "
-                puts "on standard input

" - break - } - puts -nonewline $ch - } - puts "\n

" - } - printEnv "Request environment" env - printEnv "Initial environment" initialEnv -} diff --git a/examples/tiny-perl-fcgi b/examples/tiny-perl-fcgi deleted file mode 100755 index 2faf33d..0000000 --- a/examples/tiny-perl-fcgi +++ /dev/null @@ -1,30 +0,0 @@ -#!./perl -# -# tiny-perl-fcgi -- -# -# Perl-5 FastCGI example program -# -# Copyright (c) 1996 Open Market, Inc. -# -# See the file "LICENSE.TERMS" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# $Id: tiny-perl-fcgi,v 1.1 1997/09/16 15:36:29 stanleyg Exp $ -# - - -use FCGI; -# -# Work around the "empty initial environment" bug -# -while (($ignore) = each %ENV) { -} - -$count = 0; -while(FCGI::accept() >= 0) { - print("Content-type: text/html\r\n\r\n", - "FastCGI Hello! (Perl)\n", - "

FastCGI Hello! (Perl)

\n", - "Request number ", ++$count, - " running on host $ENV{'SERVER_NAME'}\n"); -} diff --git a/examples/tiny-tcl-fcgi b/examples/tiny-tcl-fcgi deleted file mode 100755 index 650fe48..0000000 --- a/examples/tiny-tcl-fcgi +++ /dev/null @@ -1,22 +0,0 @@ -#!./tclsh -# -# tiny-tcl-fcgi -- -# -# Tcl FastCGI example program -# -# Copyright (c) 1996 Open Market, Inc. -# -# See the file "LICENSE.TERMS" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# $Id: tiny-tcl-fcgi,v 1.1 1997/09/16 15:36:29 stanleyg Exp $ -# - -set count 0 -while {[FCGI_Accept] >= 0 } { - incr count - puts -nonewline "Content-type: text/html\r\n\r\n" - puts "FastCGI Hello! (Tcl)" - puts "

FastCGI Hello! (Tcl)

" - puts "Request number $count running on host $env(SERVER_NAME)" -}