Clik here to view.

From bdc.co.uk
I’ve been writing a new application in Nodejs, using websockets (socket.io), this application is deployed using the PaaS Nodejitsu. Everything has been going great and I’ve been surprised how easy it has been to create a realtime application using socket.io. Deployment has also been a breeze with Nodejitsu’s tools. I develop on a Linux machine myself but the other day I passed the details to someone using a windows machine running internet explorer. The application stopped working with an error message, a redeploy didn’t help. The error I was presented with was as follows:;
An error has occurred: {“bytesParsed”:0,”code”:”HPE_INVALID_CONSTANT”}
As I haven’t uploaded any new code in about a week I made the incorrect assumption that something had gone wrong on nodejitsu’s side and so dropped them a tweet to let them know as they are still in beta as far as I understand.
Within 90 minutes I’d got a reply from Nuno Job (@dscape) from Nodejitsu letting me know that there was an issue with Internet Explorer, socket.io, and Joyent’s servers. He also included a workaround, and a link with further details. Excellent support!
From what I’ve understood the proxies used at Joyent don’t like non-HTTP response (from the flashsocket) and so prevent any further connections to the domain (please correct me in the comments if incorrect).
The solution is to turn off flashsocket as a transport when configuring socket.io as follows:
var io = require('socket.io').listen(80); io.configure(function(){ io.set('transports', [ 'websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling' ]); });
See: https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO
I hope this helps anyone that comes across the same issue, the original solution/explanation came from http://blog.dreamflashstudio.com/2012/08/nodejitsu-on-joyent/.
With this in place the app sprung back into life. I just really need to report to users with browsers that don’t implement websockets that they need to use something more modern…