fix bug: message body can not contains message delimiter
Fix sample error handling
Fixes for #1043
Better fix for #1036
Fix for #1044 #1047
Fix regression with streaming
Merge pull request #1022 from freedom1989/delimiter-issue

fix bug: message body can not contains message delimiter
Fix merge issue
Make sure the long-polling re-connection happened before calling onOpen