socketIO-client-2 icon indicating copy to clipboard operation
socketIO-client-2 copied to clipboard

Unexpected status code (404)

Open unm4sk1g opened this issue 8 years ago • 1 comments

I successfully connected to a localhost socket.io server, but I need to be able to connect to a HTTPS/SSL secured domain. When attempting to connect, it throws an 404 error with HTML output:

WARNING:root:eynio.com:443/client/socket.io [waiting for connection] unexpected status code (404

404 Page Not Found

404 Page Not Found

The page you requested was not found.

)

How can I resolve this ? Localhost throws 404 when you enter it in browser but still it connects successfully through Python, this one doesn't.

unm4sk1g avatar Jun 26 '17 11:06 unm4sk1g

It should handle SSL secured domains. I just ran the tests using SSL and they worked. If you are using self-signed certs you may need to add verify=False keyword argument when you are constructing a SocketIO instance.

To run the tests with SSL you follow the same process but you need to change HOST = 'localhost' to HOST = 'https://localhost' and then starting the server with DEBUG=* node tests/serve.js --secure`.

feus4177 avatar Aug 10 '17 01:08 feus4177