title: Node.js Socket.io on Heroku throws H13
body: <p>Deploying my app on Heroku breaks websockets protocol.<br>
  It works on localhost, not on Heroku. In browser, I get :</p>
  
  <blockquote>
    <p>WebSocket connection to 'wss://node-omi.herokuapp.com/socket.io/?EIO=2&amp;transport=websocket&amp;sid=<em>*</em>' failed: Error during WebSocket handshake: Unexpected response code: 503</p>
  </blockquote>
  
  <p>On the server side, I get in logs:</p>
  
  <blockquote>
    <p>2014-08-12T15:05:24.761611+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/socket.io/?EIO=2&amp;transport=websocket&amp;sid=****" host=node-omi.herokuapp.com request_id=* fwd="*" dyno=web.1 connect=3ms service=3ms status=503 bytes=864</p>
  </blockquote>
  
  <p>This is a part of my server script:</p>
  
  <pre><code>var express = require('express'),
      http = require('http'),
      socket_io = require('socket.io');
  var app = express(),
      server = http.Server(app),
      io = new socket_io(server).of('/test');
  io.on('connection', this.connection.bind(this));
  app.get('/client.html', function(req, res, next) { ... });
  app.use('/', express.static(__dirname + '/public', {'index': ['index.html']}));
  server.listen(process.env.PORT || 5000);
  </code></pre>
  
  <p>What's wrong with my code ? Does anyone succeed in building a socket.io server with Express 4.8.3 and Socket.io 1.0.6 ? The socket works with polling, but I really need websockets to work. Thanks for replies.</p>