This commit is contained in:
rald 2023-08-03 20:33:39 +08:00
parent 002c027f30
commit 1cf6f62907
2 changed files with 16 additions and 1 deletions

View File

@ -12,7 +12,7 @@ def get_client_cert(ok_if_found = True):
def get_query_string(msg, ok_if_found = True):
QUERY_STRING = os.getenv('QUERY_STRING')
if(QUERY_STRING is None):
if (not QUERY_STRING):
show_query_string_required(msg)
elif ok_if_found:
show_header_ok()

15
x.cgi Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# modules are all in the parent directory
import sys
# sys.path.append('..')
# import helpers from modules
from helpers import get_query_string, get_client_cert
user_name = get_query_string("What is your name?")
print("20 text/gemini")
print(user_name)
#vim:fenc=utf-8:ts=4:sw=4:sta:noet:sts=4:fdm=marker:ai