Unverified Kaydet (Commit) f0f62cc6 authored tarafından Alex Gaynor's avatar Alex Gaynor Kaydeden (comit) GitHub

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

üst 11225753
...@@ -390,7 +390,6 @@ def check_headers(headers): ...@@ -390,7 +390,6 @@ def check_headers(headers):
assert_(type(headers) is list, assert_(type(headers) is list,
"Headers (%r) must be of type list: %r" "Headers (%r) must be of type list: %r"
% (headers, type(headers))) % (headers, type(headers)))
header_names = {}
for item in headers: for item in headers:
assert_(type(item) is tuple, assert_(type(item) is tuple,
"Individual headers (%r) must be of type tuple: %r" "Individual headers (%r) must be of type tuple: %r"
...@@ -403,7 +402,6 @@ def check_headers(headers): ...@@ -403,7 +402,6 @@ def check_headers(headers):
"The Status header cannot be used; it conflicts with CGI " "The Status header cannot be used; it conflicts with CGI "
"script, and HTTP status is not given through headers " "script, and HTTP status is not given through headers "
"(value: %r)." % value) "(value: %r)." % value)
header_names[name.lower()] = None
assert_('\n' not in name and ':' not in name, assert_('\n' not in name and ':' not in name,
"Header names may not contain ':' or '\\n': %r" % name) "Header names may not contain ':' or '\\n': %r" % name)
assert_(header_re.search(name), "Bad header name: %r" % name) assert_(header_re.search(name), "Bad header name: %r" % name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment