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
Fix length when reading websocket frame #2
Conversation
This looks great, can you add a spec for it too? Thanks! |
Sure, I'll have something later today. |
Per https://tools.ietf.org/html/rfc6455 page 29: > If 127, the following 8 bytes interpreted as a 64-bit unsigned integer I've verified that changing the 4 to an 8 makes this gem work locally. Otherwise it raises `protocol-websocket-0.7.2/lib/protocol/websocket/frame.rb:154:in `read': undefined method `>' for nil:NilClass (NoMethodError)`
Without the fix in the previous commit, this spec will fail: Protocol::WebSocket::Connection message length can handle large message (>65k) (FAILED - 1) Failures: 1) Protocol::WebSocket::Connection message length can handle large message (>65k) Failure/Error: if length > maximum_frame_size NoMethodError: undefined method `>' for nil:NilClass
Added a spec. Let me know if that works for you |
Excellent work! Thanks so much for this. |
Released in v0.7.3. What are you planning to use this library for? |
Thanks for the quick release! I had it locally patched in the meanwhile. |
What is home-assistant? |
https://www.home-assistant.io/ |
Looks great! Well if you find any other issues your contributions are welcome! |
Thanks, I'll definitely send any other bugfixes/improvements your way, especially since the review was very quick :) |
Per https://tools.ietf.org/html/rfc6455 page 29:
I've verified that changing the 4 to an 8 makes this gem work locally. Otherwise it raises
protocol-websocket-0.7.2/lib/protocol/websocket/frame.rb:154:in `read': undefined method `>' for nil:NilClass (NoMethodError)