{"action":"created","issue":{"url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/88","labels_url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/88/comments","events_url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/88/events","html_url":"https://github.com/nkzawa/socket.io-client.java/issues/88","id":54764824,"number":88,"title":"Websocket Upgrade https","user":{"login":"CarbonAssassin","id":1757041,"avatar_url":"https://avatars.githubusercontent.com/u/1757041?v=3","gravatar_id":"","url":"https://api.github.com/users/CarbonAssassin","html_url":"https://github.com/CarbonAssassin","followers_url":"https://api.github.com/users/CarbonAssassin/followers","following_url":"https://api.github.com/users/CarbonAssassin/following{/other_user}","gists_url":"https://api.github.com/users/CarbonAssassin/gists{/gist_id}","starred_url":"https://api.github.com/users/CarbonAssassin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarbonAssassin/subscriptions","organizations_url":"https://api.github.com/users/CarbonAssassin/orgs","repos_url":"https://api.github.com/users/CarbonAssassin/repos","events_url":"https://api.github.com/users/CarbonAssassin/events{/privacy}","received_events_url":"https://api.github.com/users/CarbonAssassin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-01-19T13:42:15Z","updated_at":"2015-03-07T01:31:31Z","closed_at":null,"body":"I've been having an issue with this library and https for quite a while now. When attempting to connect to my node.js server over https the connection never upgrades to a Websocket and permanent uses xhr polling. This is with both https termination on HAPROXY and a direct connection to a node server running the https itself. As soon as I remove https and connect via https the connection instantly upgrades to a Web socket. Having had a look at the logs the client probes correctly and creates a Web socket Transport.  This transport immediately errors and the client falls back to xhr polling. The only success I had was giving IO an sslcontext which accepted all certs and host names (My Certificate is a valid one and trusted by Android by defualt) and setting the only transport to Web socket. Now the first time this is run it gets into a infinite Web socket loop and starts leaking memory. However on later attempts having been restarted the client does sometimes connect correctly via a Web socket. Having looked at the Engine.io source the Web socket is failing the ping/pong probe when using https. I've personally exhausted all things I can think of and any help would be much appreciated - I can provide any logs if you need them. It just seems odd that it upgrades perfectly on http and adding ssl breaks it immediatlty"},"comment":{"url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/comments/77665672","html_url":"https://github.com/nkzawa/socket.io-client.java/issues/88#issuecomment-77665672","issue_url":"https://api.github.com/repos/nkzawa/socket.io-client.java/issues/88","id":77665672,"user":{"login":"mhmeadows63","id":6982471,"avatar_url":"https://avatars.githubusercontent.com/u/6982471?v=3","gravatar_id":"","url":"https://api.github.com/users/mhmeadows63","html_url":"https://github.com/mhmeadows63","followers_url":"https://api.github.com/users/mhmeadows63/followers","following_url":"https://api.github.com/users/mhmeadows63/following{/other_user}","gists_url":"https://api.github.com/users/mhmeadows63/gists{/gist_id}","starred_url":"https://api.github.com/users/mhmeadows63/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhmeadows63/subscriptions","organizations_url":"https://api.github.com/users/mhmeadows63/orgs","repos_url":"https://api.github.com/users/mhmeadows63/repos","events_url":"https://api.github.com/users/mhmeadows63/events{/privacy}","received_events_url":"https://api.github.com/users/mhmeadows63/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T01:31:31Z","updated_at":"2015-03-07T01:31:31Z","body":"I have a Wireshark trace of a Java Desktop app attempting an HTTPS connect to a NodeJS SocketIO server, and it shows the websocket-upgrade request is transmitted as plain-text, while XHR polling requests are encrypted.\r\n\r\nSadly, I don't think sharing the trace would be much help without my TLS key for decode.\r\n\r\nHowever, the following ladder diagrams attempts to detail my observation:\r\n1) encrypted XHR poll exchange to port 8080\r\n\r\n```\r\n[----------Client----------]    [----------Server:8080-----------]\r\n                         SYN ->\r\n                             <- SYN,ACK\r\n                         ACK ->\r\n        TLSv1.2(ClientHello) ->\r\n                             <- ACK\r\n                             <- TLSv1.2(ServerHello)\r\n                             <- TLSv1.2(Certificate)\r\n                         ACK ->\r\n  TLSv1.2(ClientKeyExchange) ->\r\n   TLSv1.2(ChangeCipherSpec) ->\r\n           TLSv1.2(Finished) ->\r\n                             <- ACK\r\n                             <- TLSv1.2(ChangeCipherSpec,Finished)\r\n   TLS(GET /socket.io/..etc) ->\r\n                             <- HTTP(200 OK)\r\nTLSv1.2(Alert,Warning:Close) ->\r\n                     FIN,ACK ->\r\n                             <- FIN,ACK\r\n                         ACK ->\r\n```\r\n\r\n2) plain-text websocket-upgrade to port 8080\r\n```\r\n[----------Client----------]    [----------Server:8080-----------]\r\n                         SYN ->\r\n                             <- SYN,ACK\r\n                         ACK ->\r\n PLAIN(GET /socket.io/..etc) ->\r\n                             <- ACK\r\n                     RST,ACK ->\r\n```\r\n\r\nAnybody else think this might be relevant?"}}