gimite / web-socket-ruby

HTML5 Web Socket server/client implementation in Ruby
375 stars 71 forks source link

Encoding mismatch in samples #19

Closed skayred closed 11 years ago

skayred commented 11 years ago

Hello!

I tried to run example from your library and got following error:

Server is running at port 10081
Connection accepted
Path: /, Origin: http://localhost
/Users/dmitrysavchenko/projects/web-socket-ruby/lib/web_socket.rb:346:in `gets': encoding mismatch: ASCII-8BIT IO with UTF-8 RS (ArgumentError)
    /Users/dmitrysavchenko/projects/web-socket-ruby/lib/web_socket.rb:346:in `gets'
    /Users/dmitrysavchenko/projects/web-socket-ruby/lib/web_socket.rb:188:in `receive'
    samples/echo_server.rb:24:in `block in <main>'
    /Users/dmitrysavchenko/projects/web-socket-ruby/lib/web_socket.rb:471:in `block in run'

I'm running MacOS 10.6, ruby 2.0.0p0

gimite commented 11 years ago

Thanks. I'll take a look. I haven't tested the library with Ruby 2.0.

gimite commented 11 years ago

Fixed.