hanami / router

Ruby/Rack HTTP router
http://hanamirb.org
MIT License
362 stars 92 forks source link

remove body cleanup for HEAD requests #169

Closed GustavoCaso closed 6 years ago

GustavoCaso commented 6 years ago

Fixes #164

@jodosha when removing the code that was cleaning the body for HEAD requests, many tests fail because we are using lint for Rack::MockResponse.

To fix that I use Rack::Head middleware to solve it, also had to add a special case for the routing_spec by modifying the body depending on the type of request.

WDYT?

jodosha commented 6 years ago

@GustavoCaso I merged unstable here, because I updated that branch to make the build to pass with the latest rubocop. This should make CI to pass for this PR as well.

GustavoCaso commented 6 years ago

@jodosha I updated the specs 😉