Skip to content

Commit

Permalink
Set Connection: keep-alive header directly without going through set_…
Browse files Browse the repository at this point in the history
…header.

set_header is not allowed in WebSocketHandler, but some proxies add
this header unconditionally.

Closes tornadoweb#897.
  • Loading branch information
bdarnell committed Sep 8, 2013
1 parent b5ec807 commit 684fda2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tornado/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def clear(self):
not self.request.connection.no_keep_alive):
conn_header = self.request.headers.get("Connection")
if conn_header and (conn_header.lower() == "keep-alive"):
self.set_header("Connection", "Keep-Alive")
self._headers["Connection"] = "Keep-Alive"
self._write_buffer = []
self._status_code = 200
self._reason = httputil.responses[200]
Expand Down

0 comments on commit 684fda2

Please sign in to comment.