mwylde/em-websocket-client — pull request #5 by movitto (2013-10-31 14:08:29+00:00)
Title: Expose websocket protocol_version and origin attributes

Greetings I ran into a few issues when using em-websocket-client in the em-websocket test suite. I'm attempting to update em-websocket to the latest http_parser.rb version which also entails updating em-http-request for the spec suite and that no longer supports websockets.

To be able to incorporate em-websocket-client we need to be able to write to the protocol_version and origin attributes of the internal handshake instance so as to properly test those in em-websocket. The first patch of the two adds this feature.

The second fixes an edge case I ran into w/ the em-websocket test suite where the websocket handshake content and initial data were sent together, and em-websocket-client wasn't picking up the remaining bits waiting in the handshake instance. The patch simply picks this up if set and processes it as normal.

Shout out if anything looks off or if anything needs to be changed to get this in. Thanks.