summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-05-11 13:27:24 +0800
committerRunxi Yu <me@runxiyu.org>2024-05-11 13:27:24 +0800
commit4d7a1a3ca2a27b14d0b408e946baa8a8ddb42fe9 (patch)
tree0483ab6d74b4bb368b1be189f332367c295f76f1
parentde2f32b0f9ffa5eed2e1134ca9fff2d0f3989118 (diff)
downloadwww-4d7a1a3ca2a27b14d0b408e946baa8a8ddb42fe9.tar.gz
Make hybrid.cgi spit environment
-rwxr-xr-xhybrid.cgi10
-rwxr-xr-xtest.cgi5
2 files changed, 10 insertions, 5 deletions
diff --git a/hybrid.cgi b/hybrid.cgi
new file mode 100755
index 0000000..49ede51
--- /dev/null
+++ b/hybrid.cgi
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import sys
+import os
+
+sys.stdout.write("Content-Type: text/plain\r\n")
+sys.stdout.write("\r\n")
+
+import pprint
+pprint.pprint(os.environ)
diff --git a/test.cgi b/test.cgi
deleted file mode 100755
index e100958..0000000
--- a/test.cgi
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-printf 'Content-Type: text/plain\r\n'
-printf '\r\n'
-env