LearnBoost/engine.io-client — pull request #247 by bmalehorn (2014-02-08 21:28:43+00:00)
Title: fix util.parseUri('localhost:3000') bug

'http:foo.com' is a valid way to specify protocol of 'http' (no '//' is necessary).

Unfortunately, this means that 'http:3000' and 'localhost:3000' are parsed the same way, with protocol = 'localhost' for the second one.

This diff changes the regular expression to blacklist 'localhost' from being a protocol, fixing this problem while still allowing for 'http:3000' to be parsed correctly. It also adds a test ensuring 'localhost:3000' now works.