-
Notifications
You must be signed in to change notification settings - Fork 16
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
Timeout with MachineGun.get!, but not with HTTPoison.get! #1
Comments
Looks like your backend server has issues with lowercase headers, which are required by HTTP/2: https://tools.ietf.org/html/rfc7540#section-8.1.2 You can change
|
To see actual error you can increase request timeout:
|
Here’s the error when the request timeout is increased.
At this point, I’m fairly certain that the header case is not the cause. I was just reading the HTTPoison and Hackney code and I saw nothing that transformed the headers in any way, and I literally passed the same headers structure to both HTTPoison.get! and MachineGun.get! (so both had lowercase headers). I also modified my cURL request:
|
Yes, you are right. "Stream reset by server." does not happen with curl. |
Please try without |
That was the problem. |
I’ve elided some secrets for a query that fails with MachineGun but succeeds with HTTPoison. I can share privately if you wish to work with this. I tried to reproduce just with
gun
, but don’t have enough familiarity with the Gun API to see what’s going on.This isn’t an HTTP/1 vs HTTP/2 issue, as far as I can tell (the server isn’t explicitly set up for HTTP/2, but it appears that the version of nginx we’re running as a proxy is taking care of that for us), so here’s the equivalent cURL with an appropriate log:
The text was updated successfully, but these errors were encountered: