Closed synthead closed 9 years ago
More information from Tornado's documentation: http://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket.WebSocketHandler.check_origin
Hey @synthead thanks for the pull request, though, I'm wondering - do you explicitly need tornado 4.x? There is a branch in the works that fixes a few things - among them an upgrade to tornado 4.x (https://github.com/moccu/django-omnibus/commit/514c87a31267ab419958e4bc955d3e727f7e1f8f) - so I'm wondering - did you upgrade on purpose or did something upgrade the tornado package without acknowledging our <=4.x constraint?
I'm merging this for now, I'm working on some other bugfixes and attempt to release a v0.2.1 sometime during the next few days.
Ah, I didn't realize that there is a <=4.x constraint! I should have payed more attention to the requirements. I upgraded Tornado on my machines in a routine full package upgrade and didn't think anything of it.
Will the 0.2.1 release provide support for the new Tornado?
I can test it with 4.x - sure.
I think an update to python-tornado (I'm on 4.0.2) breaks incoming WebSocket connections in Omnibus. In Googling around, the common answer is to simply add a check_origin method that returns True. This mimics the behavior tornado used to have and allows the WebSocket connections gracefully.
Before this commit, these messages would be displayed from omnibusd:
Some references: https://github.com/mopidy/mopidy/issues/788 http://stackoverflow.com/questions/24851207/tornado-403-get-warning-when-opening-websocket http://stackoverflow.com/questions/25177147/tornadio2-failed-error-during-websocket-handshake-unexpected-response-code