-
Notifications
You must be signed in to change notification settings - Fork 10
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
Occasional Net::HTTPBadResponse after sending first message #4
Comments
That sounds really odd, the stacktrace disappears down into the Ruby HTTP layer itself, and it seems like the server responds with something that's not parsable as a HTTP response. Could you maybe attach a tcpdump, wireshark, or something similar beside the application - to see if you can get a copy of the request and response that ends up killing the application? (Of course without API keys and other identifiable information) |
I tried to capture the traffic but the server uses TLS when responding, even if you request using plain HTTP. I started looking on how can someone debug this easily without having to read the traffic, and I found this gist, which produced the following:
On another note, this issue, which was solved with this PR, plus this SE answer suggest that setting |
Not quite the same issue there, the linked issue reports an error with a status line filled with non-ASCII garbage - also known as encrypted data. Also, SSL is used if your homeserver URL uses the https scheme, or in fact if not provided a scheme. So the only way to not use SSL is to explicitly request a connection to a In all honesty, it seems like the server's responding with just a 0, which seems really odd. |
When sending a message with
simple_client.rb
sometimes it works fine, but other times I get these errors and the program exits after sending the message:By running it a few times, I noticed that this either happens after the first message that is sent after the client is started or it doesn't happen at all. If it happens, it usually takes a few extra seconds to send the message, but it is delivered successfully just before exiting.
The text was updated successfully, but these errors were encountered: