You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought if OnBodyChunk is called each time the body is (successfully) polled, I would also get a callback for when it's done, but the way the traits are organized, I don't think I can get what I want without changing tower_http's internals. Is there a reason for why these need to be tied together, or was this just an oversight? Or perhaps I'm missing something?
The text was updated successfully, but these errors were encountered:
It seems a bit odd to me that when using
ServerErrorsAsFailures
(the default classifier used byTraceLayer::new_for_http()
), theOnEos
callback is never called. After looking at the code, I found that the response body only carries the callback if the response could not yet be classified: https://docs.rs/tower-http/0.6.2/src/tower_http/trace/future.rs.html#83I thought if
OnBodyChunk
is called each time the body is (successfully) polled, I would also get a callback for when it's done, but the way the traits are organized, I don't think I can get what I want without changingtower_http
's internals. Is there a reason for why these need to be tied together, or was this just an oversight? Or perhaps I'm missing something?The text was updated successfully, but these errors were encountered: