David Pedersen
David Pedersen
Are you able to share a minimal reproducible example?
Hyper errors have h2 errors as the ["source"](https://doc.rust-lang.org/stable/std/error/trait.Error.html#method.source) which should get picked up by tonic. At least I remember doing a bunch of testing around that last time we worked...
Is it actually possible? Hyper requires services accept `Request`. You can change the body in a middleware but the top level body must be `hyper::Body`.
Yes that's what I meant.
You can set your data in a [`http::Request` extension](https://docs.rs/http/latest/http/request/struct.Request.html#method.extensions_mut) and then extract it in your RPC via [`tonic::Request::extension`](https://docs.rs/tonic/latest/tonic/struct.Request.html#method.extensions). Tonic automatically copies http extensions into grpc extensions.
I think this is something thats worth supporting! Feels like a good extension to the whole codec system. However I've never done anything like this myself so not sure what...
Sure technically it could. The real question is in designing a good API for it, defining the use cases we want to support, and making sure it fits with where...
So is the issue that making a client to server stream appears to leak memory if the server only looks at the [`Request`](https://docs.rs/tonic/0.4.1/tonic/struct.Request.html) and doesn't actually consume the stream?
I don't quite know enough about the internals but could this be fixed by using tcp/http2 keepalive? Tonic lets hyper and h2 handle all the low level transport/connection parts.
[Yep](https://docs.rs/tonic/0.4.1/tonic/index.html?search=alive)