bug 752776. Mozilla tweaks to pywebsocket v631. r=mcmanus

This commit is contained in:
Jason Duell 2012-05-16 17:04:46 -07:00
parent faabb68615
commit c2c75f6fb3
2 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,7 @@ This pywebsocket code is mostly unchanged from the source at
The current Mozilla code is based on
svnversion: 606 (supports RFC 6455, aka Sec-WebSocket-Version: 13)
svnversion: 631 (supports RFC 6455)
--------------------------------------------------------------------------------
STEPS TO UPDATE MOZILLA TO NEWER PYWEBSOCKET VERSION

View File

@ -266,6 +266,9 @@ class Handshaker(object):
def _set_protocol(self):
self._request.ws_protocol = None
# MOZILLA
self._request.sts = None
# /MOZILLA
protocol_header = self._request.headers_in.get(
common.SEC_WEBSOCKET_PROTOCOL_HEADER)
@ -359,6 +362,11 @@ class Handshaker(object):
response.append(format_header(
common.SEC_WEBSOCKET_EXTENSIONS_HEADER,
format_extensions(self._request.ws_extensions)))
# MOZILLA: Add HSTS header if requested to
if self._request.sts is not None:
response.append(format_header("Strict-Transport-Security",
self._request.sts))
# /MOZILLA
response.append('\r\n')
raw_response = ''.join(response)