socket io version : 0.9.10
source: Manager.prototype.handleHandshake
If there a way to pass the required HTTP error code upon authorization failure, it would be convenient for applications. Currently socket.io sends HTTP 403 by default.
writeErr(403, 'handshake unauthorized');
Actually during the authorization process, my application verifies the authentication details before allowing a client to get connected. And if the authentication fails, it would be appropriate to send a HTTP 401 rather than HTTP 403 so that the client shall retry with correct credentials.