-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Description
- I have looked for existing issues (including closed) about this
I read this old thread but it didn't really address this problem: tokio-rs/axum#853.
Bug Report
Version
$ cargo tree | grep tower-http
└── tower-http v0.6.6
Platform
$ uname -a
Darwin dportMacbookM4.local 25.0.0 Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:26 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6041 arm64
Crates
axum = "0.7"
tokio = { version = "1", features = ["full"] }
tower = "0.5.2"
tower-http = { version = "0.6.6", features = ["limit"] }
hyper = { version = "1.0", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] }
http-body-util = "0.1"
bytes = "1"
futures-util = "0.3"
Description
I have example code here:
Right now when using the request limit layer you get a client error, rather than a clean 413 response. I was hoping RequestBodyLimitLayer would handle this on my behalf, is there a any chance the layer could be modified to handle this more gracefully? Like making the limited body return an error that results in a 413 response?
Metadata
Metadata
Assignees
Labels
No labels