We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Run this little script:
require 'midori.rb' class AppRoute < Midori::API capture Errno::ENOENT do |e| @status = 404 "Not found" end websocket '/' do |ws| ws.on :open do ws.send '125 bytes: ok' ws.send '1' * 125 ws.send '126 bytes: fail' ws.send '1' * 126 ws.send 'pipe is broken' end end get '/' do <<~HTML <!DOCTYPE html> <meta charset="UTF-8"> <title>Midori Issue WebSocket</title> <p>Open the console to see errors.</p> <script> var ws = new WebSocket('ws://localhost:8080'); ws.addEventListener('message', function (e) { console.log(e.data); }); </script> HTML end end begin Midori::Runner.new(AppRoute).start rescue Interrupt puts "See you next time." rescue => e puts "#{e.class}: #{e}" retry end
Error messages will be shown both in the browser console and the terminal.
WebSocket frame size has a limit of 2^63 bytes (if we correctly implement it according to the RFC).
ws.send '1' * 126 suddenly broke the socket, but the error shows until a new message is about to send (say, ws.send 'pipe is broken').
ws.send '1' * 126
ws.send 'pipe is broken'
Midori version: 0.7.0
Ruby version: 2.6.3
The text was updated successfully, but these errors were encountered:
Thank you for your report. The bug has confirmed. I'm working on fixing it.
Sorry, something went wrong.
I've just submitted a patch #173 . It may require more testing before merging.
Bug fixed. Thank you so much for your submission.
No branches or pull requests
Steps to reproduce
Run this little script:
Error messages will be shown both in the browser console and the terminal.
Expected behavior
WebSocket frame size has a limit of 2^63 bytes (if we correctly implement it according to the RFC).
Actual behavior
ws.send '1' * 126
suddenly broke the socket, but the error shows until a new message is about to send (say,ws.send 'pipe is broken'
).System configuration
Midori version: 0.7.0
Ruby version: 2.6.3
The text was updated successfully, but these errors were encountered: