summaryrefslogtreecommitdiff
path: root/web/src/cgi.tcl-1.10/example/version.cgi
diff options
context:
space:
mode:
authorEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
committerEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
commit094ca96844842928810f14844413109fc6cdd890 (patch)
treee60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /web/src/cgi.tcl-1.10/example/version.cgi
downloadalpine-094ca96844842928810f14844413109fc6cdd890.tar.xz
Initial Alpine Version
Diffstat (limited to 'web/src/cgi.tcl-1.10/example/version.cgi')
-rw-r--r--web/src/cgi.tcl-1.10/example/version.cgi30
1 files changed, 30 insertions, 0 deletions
diff --git a/web/src/cgi.tcl-1.10/example/version.cgi b/web/src/cgi.tcl-1.10/example/version.cgi
new file mode 100644
index 00000000..b266acfb
--- /dev/null
+++ b/web/src/cgi.tcl-1.10/example/version.cgi
@@ -0,0 +1,30 @@
+#!/depot/path/tclsh
+
+# This is a CGI script that displays some version information that I
+# find useful for debugging.
+
+set v [package require cgi]
+
+proc row {var val} {
+ table_row {
+ td $var
+ td $val
+ }
+}
+
+cgi_eval {
+ source example.tcl
+
+ title "Version info"
+
+ cgi_body {
+ table border=2 {
+ row "cgi.tcl" $v
+ row "Tcl" [info patchlevel]
+ row "uname -a" [exec uname -a]
+ catch {row "SERVER_SOFTWARE" $env(SERVER_SOFTWARE)}
+ catch {row "HTTP_USER_AGENT" $env(HTTP_USER_AGENT)}
+ catch {row "SERVER_PROTOCOL" $env(SERVER_PROTOCOL)}
+ }
+ }
+}