einaros/ws — pull request #45 by nicokaiser (2012-03-23 00:41:05+00:00)
Title: Allow empty (hixie) messages / fix close frame

As far as I understand the hixie draft, the close frame is not "00 ff" but "ff 00":
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76#page-4

The current version of ws closes the connection if the client sends an empty message ("00 ff"), which should not happen. This commit fixes the behavior and allows empty (hixie) messages and interprets the hixie close frame correctly.