fix stream reading by length
working websocket sample page