diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index b8299876..1e61fc65 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -132,7 +132,7 @@ module Sinatra # http://rubydoc.info/github/rack/rack/master/Rack/Response # http://rubydoc.info/github/rack/rack/master/Rack/Response/Helpers class Response < Rack::Response - DROP_BODY_RESPONSES = [204, 205, 304] + DROP_BODY_RESPONSES = [204, 304] def initialize(*) super headers['Content-Type'] ||= 'text/html' diff --git a/test/helpers_test.rb b/test/helpers_test.rb index d8f65ddc..52d5fbce 100644 --- a/test/helpers_test.rb +++ b/test/helpers_test.rb @@ -8,7 +8,7 @@ class HelpersTest < Minitest::Test end def status_app(code, &block) - code += 2 if [204, 205, 304].include? code + code += 2 if [204, 304].include? code block ||= proc { } mock_app do get('/') do diff --git a/test/response_test.rb b/test/response_test.rb index 64b5e0ee..a5d360b4 100644 --- a/test/response_test.rb +++ b/test/response_test.rb @@ -27,7 +27,7 @@ class ResponseTest < Minitest::Test assert_equal 'Hello World', @response.body.join end - [204, 205, 304].each do |status_code| + [204, 304].each do |status_code| it "removes the Content-Type header and body when response status is #{status_code}" do @response.status = status_code @response.body = ['Hello World']