Home | History | Annotate | Download | only in mod_pywebsocket

Lines Matching refs:protocol

68     r'(WebSocket-Protocol: [\x20-\x7e]+\r\n)?'
88 def _validate_protocol(protocol):
89 """Validate WebSocket-Protocol string."""
91 if not protocol:
92 raise HandshakeError('Invalid WebSocket-Protocol: empty')
93 for c in protocol:
95 raise HandshakeError('Illegal character in protocol: %r' % c)
165 protocol = self._request.headers_in.get('WebSocket-Protocol')
166 if protocol is not None:
167 _validate_protocol(protocol)
168 self._request.ws_protocol = protocol
172 'HTTP/1.1 101 Web Socket Protocol Handshake\r\n')
182 self._request.connection.write('WebSocket-Protocol: ')