Lawouach / WebSocket-for-Python

WebSocket client and server library for Python 2 and 3 as well as PyPy (ws4py 0.5.1)
https://ws4py.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
1.12k stars 288 forks source link

Return additional headers/response code with HandshakeException #214

Closed AeroNotix closed 7 years ago

AeroNotix commented 7 years ago

The RFC requires that non-101 upgrades are processed as RFC 2616 responses. Therefore clients may need to use this information. E.g. 401s, 301s etc. Dropping these responses on the floor doesn't allow client behaviour to be modified when given direction from the server.

(I know tests may fail but wanting feedback before continuing)