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

x/net/websocket: Can't connect to Server through Chrome. #3987

Closed
gopherbot opened this issue Aug 22, 2012 · 3 comments
Closed

x/net/websocket: Can't connect to Server through Chrome. #3987

gopherbot opened this issue Aug 22, 2012 · 3 comments
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 22, 2012

by huluyet:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

What steps will reproduce the problem?
1. Just run any golang websocket server.(such as the trivial example server
"EchoServer" in the document on websocket)
2. In Chrome Use javaScript to new Webscocket to connect to the server. 


What is the expected output?
I think no Exception or Error should be expected.

What do you see instead?
In the console of Chrome, I see :
Unexpected response code: 400
connection closed (1006) 


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Ubuntu 12.04 amd64

Which version are you using?  (run 'go version')
go1.0.2

Please provide any additional information below.
The websocket server can be connected by a client written in golang.
But it can not be connected by JavaScript in Chrome or Firefox.
And My Chrome version is 19.0.1084.52.
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Aug 22, 2012

Comment 1 by huluyet:

Sorry, the title should be :   Can't connect to websocket Server through Chrome.
How can I fix it?
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Aug 27, 2012

Comment 2 by huluyet:

OK, at last , I can make it works.
I just put the html in the same domain with the websocket server?
So, is that means it cannot be accessed by a browser client in different domain?
But it can be accessed by arbitrary client written in golang.
@minux
Copy link
Member

@minux minux commented Aug 29, 2012

Comment 3:

Status changed to Retracted.

@mikioh mikioh changed the title Can't connect to Server through Chrome. x/net/websocket: Can't connect to Server through Chrome. Jul 30, 2015
@mikioh mikioh modified the milestone: Unreleased Jul 30, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.