Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'WebSocketProtocol' object has no attribute 'requestHeaders' #81

Closed
whs opened this issue Feb 10, 2017 · 1 comment
Closed

'WebSocketProtocol' object has no attribute 'requestHeaders' #81

whs opened this issue Feb 10, 2017 · 1 comment

Comments

@whs
Copy link

whs commented Feb 10, 2017

I've recently upgraded Channels to the latest version, and found that WebSocket broke:

2017-02-10 22:22:47,341 ERROR    Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/daphne/ws_protocol.py", line 62, in onConnect
    self.requestHeaders,
AttributeError: 'WebSocketProtocol' object has no attribute 'requestHeaders'

You can try this out: curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H 'Sec-WebSocket-Version: 13' -H 'Sec-WebSocket-Key: XXXXXXXXXXXXXXXXXXXXXX==' https://tmstreamlabs.cupco.de. Note that this URL is not in the routing configuration, so there is no application code. Valid endpoints also have this problem.

  • Setup: Separate Docker containers (but same image) for daphne + worker communicating using another Redis container
  • Daphne is behind nginx, which also strip SSL
  • Library version:
    • Channels: 1.0.3
    • Daphne: 1.0.2
    • Django: 1.10.5
    • Twisted: 16.6.0
    • asgi_redis: 1.0.0
    • autobahn: 0.17.1
@whs
Copy link
Author

whs commented Feb 10, 2017

Probably duplicate of #78

@whs whs closed this as completed Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant