gemini.git

going-flying.com gemini git repository

summary

tree

log

refs

32cb5366fad6d38d016d2cd1e1999622cff5997c - Matthew Ernisse - 1614711349

new cgi worksg

view tree

view raw

diff --git a/cgi-bin/clientcert.py b/cgi-bin/clientcert.py
deleted file mode 100755
index 0ed7300..0000000
--- a/cgi-bin/clientcert.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import sys
-from gmicgi import GeminiCGI
-
-cgi = GeminiCGI()
-
-@cgi.route('')
-@cgi.certificate_required
-def default():
-	cgi.Response.Ok('text/gemini')
-	print('''
-This is a CGI test.  Below enumerates the environment passed by the server to the script.
-
-```
-''')
-	for k, v in os.environ.items():
-		print(f'{k}={v}')
-
-	print()
-	print('''
-
-And below here are any parameters passed to the script itself.
-
-```
-''')
-
-	print(sys.argv[1:])
-	print()
-	print('```')
-
-
-if __name__ == '__main__':
-	cgi.run()
diff --git a/cgi-bin/example.py b/cgi-bin/example.py
deleted file mode 100755
index 60edfcd..0000000
--- a/cgi-bin/example.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import sys
-
-from gmicgi import GeminiCGI
-
-cgi = GeminiCGI()
-
-@cgi.route('')
-def default():
-	''' This should be the default route.'''
-	cgi.Response.Ok('text/gemini')
-	print('''
-
-This is a CGI test.  Below enumerates the environment passed by the server to the script.
-
-```
-''')
-	for k, v in os.environ.items():
-		print(f'{k}={v}')
-
-	print()
-	print('''
-
-And below here are any parameters passed to the script itself.
-
-```
-''')
-
-	print(sys.argv[1:])
-	print()
-	print('```')
-
-if __name__ == '__main__':
-	cgi.run()
diff --git a/cgi-bin/needinput.py b/cgi-bin/needinput.py
deleted file mode 100755
index 3ad367c..0000000
--- a/cgi-bin/needinput.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import sys
-
-from gmicgi import GeminiCGI
-
-cgi = GeminiCGI()
-
-@cgi.route('')
-@cgi.needs_input('> ')
-def default():
-	''' This should be the default route.'''
-	cgi.Response.Ok('text/gemini')
-	print('''
-
-This is a CGI test.  Below enumerates the environment passed by the server to the script.
-
-```
-''')
-	for k, v in os.environ.items():
-		print(f'{k}={v}')
-
-	print()
-	print('''
-
-And below here are any parameters passed to the script itself.
-
-```
-''')
-
-	print(sys.argv[1:])
-	print()
-	print('```')
-
-if __name__ == '__main__':
-	cgi.run()
diff --git a/cgi-bin/test b/cgi-bin/test
index 5e3b2ce..a60409c 100755
--- a/cgi-bin/test
+++ b/cgi-bin/test
@@ -10,8 +10,8 @@ cgi = GeminiCGI()
 MAIN_PAGE='''
 # Molly Brown / gmicgi test suite
 
-=> certificate
-=> input
+=> /cgi-bin/test/certificate
+=> /cgi-bin/test/input
 
 '''
 
@@ -52,7 +52,7 @@ def print_cgi_environ():
 
 	print()
 	print('''
-
+```
 ## And below here are any parameters passed to the script itself.
 
 ```