mirek / CoreWebSocket

Web Socket Server and Client Library for iOS and OSX. Follows Core Foundation API style.
http://en.wikipedia.org/wiki/WebSockets
142 stars 31 forks source link

Messages with even number of characters not read properly in RFC 6455 version #1

Closed armandoheor closed 11 years ago

armandoheor commented 11 years ago

From what I've been testing it looks like a message with an even number of characters is not read properly.

I identified that the payload data for messages with even number of characters is not masked while the ones with odd number of characters are. I don't know if that makes a difference.

mirek commented 11 years ago

good catch, can't really test it properly now, can you have a look if this fixes it? https://github.com/mirek/CoreWebSocket/commit/300dcba1da13645da0bd0174965be9a1f130ec1b

armandoheor commented 11 years ago

I ran a few tests and it looks like it is fixed. Nice job! Thanks.