mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-35565: Add detail to assertion failure message in wsgiref (GH-11293)
This commit is contained in:
parent
32d96a2b5b
commit
5ef4fc241a
2 changed files with 15 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue