From: Ben Darnell Date: Fri, 5 Oct 2012 04:35:02 +0000 (-0700) Subject: One more log spam test: connect then immediately close the connection. X-Git-Tag: v3.0.0~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=773cbf6622294dcd144fcd0589fa7bc8fd4838ea;p=thirdparty%2Ftornado.git One more log spam test: connect then immediately close the connection. --- diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index cb42b7136..3ced4e1b7 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -325,6 +325,14 @@ class HTTPServerTest(AsyncHTTPTestCase): self.assertEqual(200, response.code) self.assertEqual(json_decode(response.body), {}) + def test_empty_request(self): + stream = IOStream(socket.socket(), io_loop=self.io_loop) + stream.connect(('localhost', self.get_http_port()), self.stop) + self.wait() + stream.close() + self.io_loop.add_timeout(datetime.timedelta(seconds=0.001), self.stop) + self.wait() + class XHeaderTest(HandlerBaseTestCase): class Handler(RequestHandler):