cocos2d/cocos2d-x — pull request #2904 by edwardzhou (2013-06-17 10:46:20+00:00)
Title: fix WebSocket url parse error for 'ws://domain.com/websocket' pattern

the existing code only works fine for ws://domain.com, but not for ws://domain.com/websocket. it will be parsed as
_host = "domain.com/websocket"
_port = 80
_path = "/"

the correct parse should be:
_host = "domain.com"
_port = 80
_path = "/websocket"

this patch also works for "ws://domain.com:8080/websocket"