[Python-checkins] Remove the conditional for setting query. (#23604)

orsenthil webhook-mailer at python.org
Wed Dec 2 22:48:22 EST 2020


https://github.com/python/cpython/commit/3ec9d019013a9e9125d4f8669be177b9154cb45b
commit: 3ec9d019013a9e9125d4f8669be177b9154cb45b
branch: master
author: Senthil Kumaran <senthil at uthcode.com>
committer: orsenthil <skumaran at gatech.edu>
date: 2020-12-02T19:48:14-08:00
summary:

Remove the conditional for setting query. (#23604)

files:
M Lib/http/server.py

diff --git a/Lib/http/server.py b/Lib/http/server.py
index ee99182109913..c611381177d43 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -1092,8 +1092,7 @@ def run_cgi(self):
         env['PATH_INFO'] = uqrest
         env['PATH_TRANSLATED'] = self.translate_path(uqrest)
         env['SCRIPT_NAME'] = scriptname
-        if query:
-            env['QUERY_STRING'] = query
+        env['QUERY_STRING'] = query
         env['REMOTE_ADDR'] = self.client_address[0]
         authorization = self.headers.get("authorization")
         if authorization:



More information about the Python-checkins mailing list