The code that creates the problem is in a js file, which runs on the client side:
function open_websocket(relative_path) {
var new_uri;
if (location.protocol == "https:") {
new_uri = "wss:";
} else { //could this be dangerous?
new_uri = "ws:";
}
new_uri += "//" + location.host;
if (relative_path.startsWith("/")) {
new_uri += relative_path;
} else {
if (pathname.endsWith("/")) { //NOTE: all my URLs will hit this, but we write both kinds for completeness
new_uri += loc.pathname + relative_path;
} else {
new_uri += loc.pathname + "/" + relative_path;
}
}
return new WebSocket(new_uri);
}
In the server side, the socket open() method never runs.
Any help would be greatly appreciated! I am completely stuck on this.
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
requests.exceptions.ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
One difference is that, in production, the url is a https isntead of http. As a result, I'm trying to open a websocket with 'wss' instead of 'ws'. I didn't think this would be an issue though, and either way I can't change the production url to 'http'.
Hi! Thanks so much!The error happens before I make a request.When I do make a request with these headers, the error I get is:requests.exceptions.ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
One difference is that, in production, the url is a https isntead of http. As a result, I'm trying to open a websocket with 'wss' instead of 'ws'. I didn't think this would be an issue though, and either way I can't change the production url to 'http'.
akamai is passing the headers along and it does support websockets. I've tested it before on other akamai machines and there was no problem.