Handle invalid UTF-8 gracefully
Make sockjs support optional