MCPcopy Create free account
hub / github.com/python-websockets/websockets / test_parse_too_long_line

Method test_parse_too_long_line

tests/test_http11.py:417–421  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

415 next(self.parse_headers())
416
417 def test_parse_too_long_line(self):
418 # Header line contains 5 + 8186 + 2 = 8193 bytes.
419 self.reader.feed_data(b"foo: " + b"a" * 8186 + b"\r\n\r\n")
420 with self.assertRaises(SecurityError):
421 next(self.parse_headers())
422
423 def test_parse_invalid_line_ending(self):
424 self.reader.feed_data(b"foo: bar\n\n")

Callers

nothing calls this directly

Calls 2

parse_headersMethod · 0.95
feed_dataMethod · 0.45

Tested by

no test coverage detected