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

Node.js/Socket.io not returning results in IE, using a secure connection #444

Closed
editstudio opened this issue Aug 4, 2011 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@editstudio
Copy link

I have successfully implemented socket.io, node.js and express to server realtime json data to all browsers except IE (testing on 9) using a secure connection. This worked fine everywhere until I moved it behind https. From the server console output, it shows that an event is received when called from IE:

xhr-polling received data packet 5:::{"name":"lookup_place","args":
[{"place":"Berlin"}]}
However, no response is given and the next 4 lines shown in the console are:

clearing poll timeout
xhr-polling writing 8::
set close timeout for client 27081179790885432
xhr-polling closed due to exceeded duration
When the same is done from FF or Chrome, the line "xhr-polling writing 8::" is appended with the correct response, for example:

xhr-polling writing 5:::{"name":"place_results","args":[{"a":
[{"identifier":"52156","value":"Monschau, 52156"},
{"identifier":"67590","value":"Monsheim, 67590"},
{"identifier":"04617","value":"Monstab, 04617"}]}]}
I am using node.js version 0.4.10, socket.io version 0.7.7 and express version 2.4.3. The same scripts worked perfectly fine in IE 7-9 without an https/ssl/secure connection.

Any help would be greatly appreciated in discovering why no response is delivered in IE but works fine in all others.

@editstudio
Copy link
Author

For more details, you can have a look at the source here: https://gist.github.com/1134193

No magic happening in the server, and the client_snippet.js is just a function that registers the socket events, there is no other socket.io related code in the file but if someone would like the the full script to try and replicate it with their own key/crt let me know and i will send it to you.

Thanks again!

@Pita
Copy link
Contributor

Pita commented Aug 9, 2011

are you using a reverse proxy? Or how do you add https?

@editstudio
Copy link
Author

No reverse proxy, just a https server on port 3000 (and express has been removed) providing options as per doc description.

server = https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
});

io = io.listen(server);
server.listen(process.argv[2]);

Where options, is a dictionary with values for the key, crt and ca file and on the client side secure:true is set on the Socket instance. The setup worked wonders without a secure connection across all browsers however in IE9, with https, no data is emitted to the client but the data is received.

For example:

socket.on('lookup_place', function(data){
console.log('This is output in the log.',data);
socket.emit('place_results',{a:matching_places(data.place)});
});

Output the log message but appears that the socket.emit times out.

@editstudio
Copy link
Author

Do not know what exactly happened in the code base since version 0.7.7 till 0.8.2 but the issue no longer comes up.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants