[Python-checkins] Remove tiny bit of deadcode from wsgiref.validate (#3996)

Alex Gaynor webhook-mailer at python.org
Tue Oct 31 00:07:40 EDT 2017


https://github.com/python/cpython/commit/f0f62cc61ec8c6b7b70470beadbab64eb23e6a5d
commit: f0f62cc61ec8c6b7b70470beadbab64eb23e6a5d
branch: master
author: Alex Gaynor <alex.gaynor at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-10-31T00:07:36-04:00
summary:

Remove tiny bit of deadcode from wsgiref.validate (#3996)

files:
M Lib/wsgiref/validate.py

diff --git a/Lib/wsgiref/validate.py b/Lib/wsgiref/validate.py
index 6107dcd7a4d..1c00bde220e 100644
--- a/Lib/wsgiref/validate.py
+++ b/Lib/wsgiref/validate.py
@@ -390,7 +390,6 @@ def check_headers(headers):
     assert_(type(headers) is list,
         "Headers (%r) must be of type list: %r"
         % (headers, type(headers)))
-    header_names = {}
     for item in headers:
         assert_(type(item) is tuple,
             "Individual headers (%r) must be of type tuple: %r"
@@ -403,7 +402,6 @@ def check_headers(headers):
             "The Status header cannot be used; it conflicts with CGI "
             "script, and HTTP status is not given through headers "
             "(value: %r)." % value)
-        header_names[name.lower()] = None
         assert_('\n' not in name and ':' not in name,
             "Header names may not contain ':' or '\\n': %r" % name)
         assert_(header_re.search(name), "Bad header name: %r" % name)



More information about the Python-checkins mailing list