imanel/libwebsocket — pull request #6 by schmidt349 (2012-04-22 01:02:27+00:00)
Title: V0.1.3 changes for JRuby

Hi,

There's an odd string encoding problem breaking libwebsocket on JRuby (on Mac, tested: 1.6.6, 1.6.7, 1.7beta). Previously it would quit with "RuntimeError: Checksum is wrong."

I ran it down and patched it up. I'm not sure how to characterize this issue except that JRuby evidently doesn't play by the rules when it comes to handling of character encoding on strings.

These changes are tested A-OK on both JRuby and good old MRI (1.9.3). For the record, my jruby -v is:

jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]

All best,
Harry