Fix Handler::with_state not working if request body was changed via layer (#1536)

Previously

```rust
handler.layer(RequestBodyLimitLayer::new(...)).with_state(...)
```

didn't work because we required the same request body all the way
through.
This commit is contained in:
David Pedersen
2022-11-18 11:00:52 +01:00
committed by GitHub
parent b1f894a500
commit 2e8a7e51a1
7 changed files with 56 additions and 24 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ serde = "1.0"
sync_wrapper = "0.1.1"
tower = { version = "0.4.13", default-features = false, features = ["util"] }
tower-http = { version = "0.3.0", features = ["util", "map-response-body"] }
tower-layer = "0.3"
tower-layer = "0.3.2"
tower-service = "0.3"
# optional dependencies