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
"WebSocket protocol error: httparse error: invalid token" when connect from ngrok tcp tunnel. #319
Comments
Sounds like an invalid header line or something. This error originates from the |
I've made a simple tcp server to listen for websocket connections, but the initial message sent to the server seems to be garbled. Here's a request I got on this test TCP server via ngrok:
Could this maybe have something to do with connecting with secure websockets (wss://) over ngrok? |
This certainly depends on the configuration of the ngrok. I think without an additional configuration it would indeed expect non-encrypted traffic. So it depends on which endpoints you're exposing. |
I'm running a tcp tunnel through ngrok without tls (using |
The "Got string" message looks like TLS encryption. Can it be that the client expects unencrypted HTTP headers while the server sends encrypted ones? In this case you would get a httparse error message just like you actually got. How exactly do you connect? |
When I tried using an ngrok tcp tunnel to point towards a tokio-tungstenite websocket server on my localhost, I get an "httparse error: invalid token" error. Does anyone know why this is happening?
The text was updated successfully, but these errors were encountered: