title: Socket.io Handshake fails on site but not on localhost
body: <p>Socket.io handshake fails on my site but not on localhost.
  I had to provide a custom handshake because socket.io was unable to find my query parameter.</p>
  
  <p>Here is my declaration in socket.service.js:</p>
  
  <pre><code>var ioSocket = io('https://my-site.rhcloud.com//?EIO=2&amp;transport=polling&amp;t=1414328625757-0&amp;
  token=' + Auth.getToken(), {
  
  });
  </code></pre>
  
  <p>and how I catch it on server side :</p>
  
  <pre><code>socketio.use(function(socket, next) {
        request.get('https://my-site.rhcloud.com/api/users/chan', {qs:{access_token:socket.handshake.query.token}}, function(err, me) {
            if (err||!me.body|| me.body=='Unauthorized') {
                if (!me) console.log('!me');
                if (err) console.log(err);
                next(err);
            }
            else {
                // perfoming operations
                next();
            }
        });
    });
  </code></pre>
  
  <p>Here is the message I get:</p>
  
  <pre><code>WebSocket connection to 'wss://my-site.rhcloud.com/socket.io/?EIO=2&amp;transport=websocket&amp;t=…YwMX0.1F6ebfNxzoDPYffXGapGMzLFPJd-mfN0EexqZzXXo7A&amp;sid=z0Jmrbgb7OS0nbqxAAAG' failed: Error during WebSocket handshake: Unexpected response code: 400 
  </code></pre>
  
  <p>I'm really lost here, and digged a lot into Google without any success.
  Any help would be really appreciated !</p>