Closed Jonathas-Conceicao closed 3 years ago
This is the same issue as https://github.com/http-rs/http-client/issues/75
Among other problems, I am beginning to suspect that mockito pretends it accepts HTTP/1.1
but makes no attempt at actually maintaining keep-alive
behavior.
@Jonathas-Conceicao Could you please try running cargo-update
or otherwise updating to http-client
6.3.4 and let me know if it works for you?
It is fixed with the http-client
v6.3.4, thanks for the quick response.
After updating surf's inner dependency, http-client, to it's latest v6.3 release reusing surf's client has been giving me a unexpected error.
I have the following reproducible example using some samples from my original project:
main.rs:
Cargo.toml:
The second
get
from client gives anconnection closed
error.How ever if I instead pin
http-client = "=6.2"
both requests successfully complete as expected. Re-creating thesurf::Client
for the second request fixes the issue on v6.3 but is far from ideal.I'm reporting this issue here since
surf
is what I have actually been using in my project, but maybe it should be moved to thehttp-client
project.