{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/5e6a5700add34ca206ce5cf3ed7aec89?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5e6a5700add34ca206ce5cf3ed7aec89","url":"https://api.github.com/users/makeusabrew","login":"makeusabrew","id":278461},"milestone":null,"assignee":null,"labels":[{"name":"Bug","color":"e10c02","url":"https://api.github.com/repos/LearnBoost/socket.io/labels/Bug"},{"name":"WebSocket","color":"488a2e","url":"https://api.github.com/repos/LearnBoost/socket.io/labels/WebSocket"}],"updated_at":"2011-10-28T11:39:24Z","comments":3,"closed_at":null,"url":"https://api.github.com/repos/LearnBoost/socket.io/issues/602","body":"Hi guys,\r\n\r\nFirst of all apologies I can't be more helpful with this bug report - it occurred on a production server thus logging was down to its minimum level. I'm also not very familiar with all the magic which socket.io provides, but here it is anyway. All of a sudden, my server app crashed, and the following was all I had in the log:\r\n\r\n```\r\n/var/www/socket2m/node/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js:94\r\n  if (this.req.headers.upgrade.toLowerCase() !== 'websocket') {\r\n                               ^\r\nTypeError: Cannot call method 'toLowerCase' of undefined\r\n    at WebSocket.onSocketConnect (/var/www/socket2m/node/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js:94:32)\r\n    at WebSocket.handleRequest (/var/www/socket2m/node/node_modules/socket.io/lib/transport.js:71:10)\r\n    at WebSocket.Transport (/var/www/socket2m/node/node_modules/socket.io/lib/transport.js:31:8)\r\n    at new WebSocket (/var/www/socket2m/node/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js:60:13)\r\n    at new WebSocket (/var/www/socket2m/node/node_modules/socket.io/lib/transports/websocket.js:31:17)\r\n    at Manager.handleClient (/var/www/socket2m/node/node_modules/socket.io/lib/manager.js:626:19)\r\n    at Manager.handleHTTPRequest (/var/www/socket2m/node/node_modules/socket.io/lib/manager.js:597:8)\r\n    at Manager.handleRequest (/var/www/socket2m/node/node_modules/socket.io/lib/manager.js:559:12)\r\n    at HTTPServer.<anonymous> (/var/www/socket2m/node/node_modules/socket.io/lib/manager.js:107:10)\r\n    at HTTPServer.emit (events.js:67:17)\r\n```\r\n\r\nIt looks like something unexpected happened when a new client tried to connect to the server - with my poor HTTP knowledge it looks like socket.io is always expecting an upgrade header which it didn't receive? I suspect the fact that I am *only* supporting the websocket transport (e.g. io.set('transports', ['websocket']) may be relevant - perhaps an old client tried to connect which refused to send the upgrade header. Not sure.\r\n\r\nUsing latest release, 0.8.6 for both client and server:\r\n\r\n```\r\nsocket.io@0.8.6 ./node_modules/socket.io \r\n├── redis@0.6.7\r\n├── policyfile@0.0.4\r\n└── socket.io-client@0.8.6\r\n```\r\n\r\nAnything else I can provide you with to help, just shout.\r\n","html_url":"https://github.com/LearnBoost/socket.io/issues/602","number":602,"title":"this.req.headers.upgrade is undefined when trying to call toLowerCase()","id":2077678,"created_at":"2011-10-28T11:18:38Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/5e6a5700add34ca206ce5cf3ed7aec89?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5e6a5700add34ca206ce5cf3ed7aec89","url":"https://api.github.com/users/makeusabrew","login":"makeusabrew","id":278461},"updated_at":"2011-10-28T11:39:24Z","url":"https://api.github.com/repos/LearnBoost/socket.io/issues/comments/2555158","body":"No - that's the difficulty. I was minding my own business when it happened, so no idea who / what triggered it. Sorry. I've attempted to trigger it again using every browser I can (FF 7, Chrome 14, Chrome 16 dev, IE6, Safari), with no luck.","id":2555158,"created_at":"2011-10-28T11:39:24Z"}}