Open dmeijboom opened 1 year ago
I'm not sure but could https://github.com/hyperium/hyper/issues/2855 be related? The reverse proxy uses Body::wrap_stream
for input data.
Snippet:
let stream = self
.body
.map(|buf| buf.map(|mut buf| buf.copy_to_bytes(buf.remaining())));
request.body_mut().replace(Body::wrap_stream(stream));
I'm building an alternative implementation of a (mostly) decentralised networking protocol. This protocol consists of the following services:
curl
or an application in any programming language)The traffic flow is like this (going both ways):
Both the Outway/Inway use warp for the server implementation and reqwest for the client in the reverse proxy. The configuration of reqwest is as follows:
Outway
Inway
I tried to verify this is not an issue with my reverse proxy implementation (which is very basic). To check this I used
curl
(with TLS client authentication) directly with the Inway. This works fine. So the following flow seems to work:So it seems that this is an issue between the Outway and the Inway, although I'm not 100% sure.
The error I'm getting is
BrokenPipe
inhyper
. This doesn't seem to happen when I either forcehttp1
in thereqwest::ClientBuilder
of the Outway or remove the request body stream. Not sure if it's relevant but this is how I stream the request body in the reverse proxy:Trace logs (in the Inway with
https://httpbin.org/anything
as the service endpoint):