Handshake fails when the Connection header is invalid.
(self)
| 361 | ) |
| 362 | |
| 363 | def test_invalid_connection(self): |
| 364 | """Handshake fails when the Connection header is invalid.""" |
| 365 | client = ClientProtocol(URI) |
| 366 | with alter_and_receive_response(client) as response: |
| 367 | del response.headers["Connection"] |
| 368 | response.headers["Connection"] = "close" |
| 369 | |
| 370 | self.assertHandshakeError( |
| 371 | client, |
| 372 | InvalidHeader, |
| 373 | "invalid Connection header: close", |
| 374 | ) |
| 375 | |
| 376 | def test_missing_upgrade(self): |
| 377 | """Handshake fails when the Upgrade header is missing.""" |
nothing calls this directly
no test coverage detected