chiark / gitweb /
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 227d33b236a3f87ca42e061e20cd87f6fb5c5b52..8009eafcd3f5abef6ee15a5c10abae9f602174a8 100644 (file)
--- a/cgi.py
+++ b/cgi.py
@@ -403,7 +403,7 @@ def cgiparse():
 
   ## Acquire the query string.
   if METHOD in ['GET', 'HEAD']:
 
   ## Acquire the query string.
   if METHOD in ['GET', 'HEAD']:
-    q = getenv('QUERY_STRING')
+    q = ENV.get('QUERY_STRING', '')
 
   elif METHOD == 'POST':
 
 
   elif METHOD == 'POST':