disconnect = True
else:
connection_header = self._request.headers.get("Connection")
+ if connection_header is not None:
+ connection_header = connection_header.lower()
if self._request.supports_http_1_1():
disconnect = connection_header == "close"
elif ("Content-Length" in self._request.headers
or self._request.method in ("HEAD", "GET")):
- disconnect = connection_header != "Keep-Alive"
+ disconnect = connection_header != "keep-alive"
else:
disconnect = True
self._request = None
of the websocket protocol by default, although this version can
be enabled by overriding `tornado.websocket.WebSocketHandler.allow_draft76`.
+
``IOLoop`` and ``IOStream``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
even when `os.urandom` is not implemented.
* `HTTPServer` with ``xheaders=True`` will no longer accept
``X-Real-IP`` headers that don't look like valid IP addresses.
+* `HTTPServer` now treats the ``Connection`` request header as
+ case-insensitive.
* Exception handling in `tornado.gen` has been improved. It is now possible
to catch exceptions thrown by a ``Task``.