feus4177 / socketIO-client-2

A socket.io client library for Python
http://pypi.python.org/pypi/socketIO-client-2
MIT License
16 stars 15 forks source link

Unexpected status code (404) #9

Open unm4sk1g opened 7 years ago

unm4sk1g commented 7 years ago

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 <!DOCTYPE html>

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.

feus4177 commented 7 years ago

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 withDEBUG=* node tests/serve.js --secure`.