LearnBoost/socket.io-client — pull request #655 by holic (2014-04-06 09:42:20+00:00)
Title: Fix incorrect ports in connection URL

When connecting to a Socket.IO server running on a standard HTTP/HTTPS port (80/443) with the client script running on a non-standard port, the server port is replaced with the (incorrect) client port.

This happens due to Socket.IO's URL normalization for multiplexing support. The port is removed from the URL where the server is using a port standard to the protocol (80 for HTTP, 443 for HTTPS). Once missing, Engine.IO assumes the port should match the client location's port, which would be incorrect in the scenario above.

I noticed this bug while developing on my local :8080 web server while trying to connect to a Socket.IO server running on :443 using a HTTPS URL with and without a port defined.