mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-05-13 08:57:27 +00:00
bug 752776. Mozilla tweaks to pywebsocket v631. r=mcmanus
This commit is contained in:
parent
faabb68615
commit
c2c75f6fb3
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user