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

Fix passing host to in headers #268

Open liuchong opened 3 years ago

liuchong commented 3 years ago

In WebSocketBaseClient, there is a hardcoded Host header. This pull request will let it use Host in the passed in extra headers, and if it is not exists in extra headers, will use the origin logic to set Host.