Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix WebSocket url parse error for 'ws://domain.com/websocket' pattern #2904

Merged
merged 1 commit into from Jun 19, 2013
Merged

fix WebSocket url parse error for 'ws://domain.com/websocket' pattern #2904

merged 1 commit into from Jun 19, 2013

Conversation

edwardzhou
Copy link
Contributor

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"

dumganhar pushed a commit that referenced this pull request Jun 19, 2013
closed #2312: WebSocket url parse error for 'ws://domain.com/websocket' pattern
@dumganhar dumganhar merged commit 9ec9e58 into cocos2d:develop Jun 19, 2013
@dumganhar
Copy link

Thanks.

angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
closed cocos2d#2312: WebSocket url parse error for 'ws://domain.com/websocket' pattern
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
closed cocos2d#2312: WebSocket url parse error for 'ws://domain.com/websocket' pattern
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 30, 2014
closed cocos2d#2312: WebSocket url parse error for 'ws://domain.com/websocket' pattern
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 30, 2014
closed cocos2d#2312: WebSocket url parse error for 'ws://domain.com/websocket' pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants