Skip to content

Commit 8642a38

Browse files
Update test_wsgiref.py
1 parent 35d0327 commit 8642a38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_wsgiref.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,11 @@ def testRaisesControlCharacters(self):
866866
headersWithControlCharacters2 = [('x', c0)]
867867
self.assertRaises(ValueError, base1.start_response, c0, headersLegit)
868868
self.assertRaises(ValueError, base2.start_response, statusLegit, headersWithControlCharacters1)
869-
self.assertRaises(ValueError, base3.start_response, statusLegit, headersWithControlCharacters2)
869+
# HTAB (\x09) is allowed in header values, but not in names.
870+
if c0 != "\t":
871+
self.assertRaises(ValueError, base3.start_response, statusLegit, headersWithControlCharacters2)
872+
else:
873+
base.start_response(statusLegit, headersWithControlCharacters2)
870874

871875

872876
class TestModule(unittest.TestCase):

0 commit comments

Comments
 (0)