cgi.py: No, `QUERY_STRING' is not mandatory in GET requests. 1.1.0
authorMark Wooding <mdw@distorted.org.uk>
Thu, 12 Jun 2014 14:02:54 +0000 (15:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 12 Jun 2014 14:02:54 +0000 (15:02 +0100)
cgi.py

diff --git a/cgi.py b/cgi.py
index 227d33b..8009eaf 100644 (file)
--- a/cgi.py
+++ b/cgi.py
@@ -403,7 +403,7 @@ def cgiparse():
 
   ## Acquire the query string.
   if METHOD in ['GET', 'HEAD']:
-    q = getenv('QUERY_STRING')
+    q = ENV.get('QUERY_STRING', '')
 
   elif METHOD == 'POST':