]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add return statements missing from HEAD/204 fix
authorBen Darnell <ben@bendarnell.com>
Tue, 25 Oct 2011 17:50:22 +0000 (10:50 -0700)
committerBen Darnell <ben@bendarnell.com>
Tue, 25 Oct 2011 17:50:22 +0000 (10:50 -0700)
tornado/simple_httpclient.py

index 65a241f5c51757e36fb7a3f7a890c4e612e8aee8..15773bb3bff2d13d0031508a35e39318f73b7861 100644 (file)
@@ -329,12 +329,14 @@ class _HTTPConnection(object):
             # HEAD requests never have content, even though they may have
             # content-length headers
             self._on_body(b(""))
+            return
         if 100 <= self.code < 200 or self.code in (204, 304):
             # These response codes never have bodies
             # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
             assert "Transfer-Encoding" not in self.headers
             assert content_length in (None, 0)
             self._on_body(b(""))
+            return
 
         if (self.request.use_gzip and
             self.headers.get("Content-Encoding") == "gzip"):