| 118 | self.assertEqual(response.body, b"Got 5000 bytes in POST") |
| 119 | |
| 120 | def test_non_ssl_request(self): |
| 121 | # Make sure the server closes the connection when it gets a non-ssl |
| 122 | # connection, rather than waiting for a timeout or otherwise |
| 123 | # misbehaving. |
| 124 | with ExpectLog(gen_log, "(SSL Error|uncaught exception)"): |
| 125 | with ExpectLog(gen_log, "Uncaught exception", required=False): |
| 126 | with self.assertRaises((IOError, HTTPError)): # type: ignore |
| 127 | self.fetch( |
| 128 | self.get_url("/").replace("https:", "http:"), |
| 129 | request_timeout=3600, |
| 130 | connect_timeout=3600, |
| 131 | raise_error=True, |
| 132 | ) |
| 133 | |
| 134 | def test_error_logging(self): |
| 135 | # No stack traces are logged for SSL errors. |