-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.A-serverArea: server.Area: server.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.
Description
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.
Metadata
Metadata
Assignees
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.A-serverArea: server.Area: server.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.