The Rack::Chunked middleware in the default deployment/development stacks is oblivious to HEAD requests and returns a body, even though the HTTP spec says that there must not be a response body. There are two solutions to this that I see:
a) Add Rack::Head before Rack::Chunked in the default middleware stacks.
b) Replace the body with an empty array in Rack::Chunked when the request method is HEAD, perhaps using the same logic as Rack::Head.
tbh, Chunked, Head, Content-Length and so on want to be pushed into servers over time. They shouldn't really be implemented as middleware, as they need to be coupled concerns for high performance servers.