Better connection check in RequestHandler #514

merged 1 commit into from May 26, 2012


None yet

2 participants


RequestHandler checks only if the connection is an attribute to the request object. By default HTTPRequest has connection=None which going to make the RequestHandler to fail in adding a stream close callback.

tornadoweb member

This seems like a good change, but I'm curious how you came across it? The only place we create httpserver.HTTPRequests always passes in a connection, so RequestHandler should never see a request whose connection is None (The hasattr check is actually to distinguish between httpserver.HTTPRequest and wsgi.HTTPRequest)

@bdarnell bdarnell merged commit 7d4623b into tornadoweb:master May 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment