jeremyevans/roda

header_matchers plugin can't match content-type

Closed this issue · 1 comments

class App < Roda
  plugin :header_matchers

  route do |r|
    r.on header: 'content-type' do |content_type|
      # never reached
    end
  end
end

HTTP.headers('content-type' => 'application/some+json').get('http://localhost:9292')

Roda is looking for HTTP_CONTENT_TYPE but it looks like Rack doesn't prepend HTTP_ to the Content-Type header.

Thanks for posting the issue. This is also true for Content-Length. I'll fix this issue before the next release.