Version
hyper 1.5.0
Platform
MacOS
Description
With HEAD requests it seems it is often the case that content-length is set to relevant GET body response, but payload is empty.
That's what for example tower_http ServeDir does. In debug mode this triggers panic:
https://github.com/hyperium/hyper/blob/master/src/proto/h1/role.rs#L704C36-L704C89
I guess this assertion should skip HEAD method completely or maybe it's more of a tower_http bug and body should define different sizehints here?
Release version works as expected, as assertion is skipped.
Version
hyper 1.5.0
Platform
MacOS
Description
With HEAD requests it seems it is often the case that content-length is set to relevant GET body response, but payload is empty.
That's what for example tower_http ServeDir does. In debug mode this triggers panic:
https://github.com/hyperium/hyper/blob/master/src/proto/h1/role.rs#L704C36-L704C89
I guess this assertion should skip HEAD method completely or maybe it's more of a tower_http bug and body should define different sizehints here?
Release version works as expected, as assertion is skipped.