I had a fully working websocket setup on my arduino with the ESP8266 - but was getting random disconnects after about 4-5 hours of continual use.
Just updated the firmware to the 9.5 ver and bam - web socket handshake fails, because the send request from the module isnt firing correctly.
An oddity i also see is the send response seems to be appending a single white space before the actualy http header text im trying to send.The length also seems mismatched which would coinside with what others are saying about the \r\n data.
These modules are a pain :/