diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-12-25 23:19:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-12-25 23:19:11 (GMT) |
commit | 5ef4fc241aea6759ef3f55b1ef564aebc492a0db (patch) | |
tree | a0695bf2d5c08f7e0ce7ee0321045a3683f803c1 /Lib/wsgiref | |
parent | 32d96a2b5bc3136d45a66adbdb45fac351b520ce (diff) | |
download | cpython-5ef4fc241aea6759ef3f55b1ef564aebc492a0db.zip cpython-5ef4fc241aea6759ef3f55b1ef564aebc492a0db.tar.gz cpython-5ef4fc241aea6759ef3f55b1ef564aebc492a0db.tar.bz2 |
bpo-35565: Add detail to assertion failure message in wsgiref (GH-11293)
Diffstat (limited to 'Lib/wsgiref')
-rw-r--r-- | Lib/wsgiref/handlers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py index f4300b8..28ed9b7 100644 --- a/Lib/wsgiref/handlers.py +++ b/Lib/wsgiref/handlers.py @@ -233,7 +233,8 @@ class BaseHandler: for name, val in headers: name = self._convert_string_type(name, "Header name") val = self._convert_string_type(val, "Header value") - assert not is_hop_by_hop(name),"Hop-by-hop headers not allowed" + assert not is_hop_by_hop(name),\ + f"Hop-by-hop header, '{name}: {val}', not allowed" return self.write |