Permalink
Browse files

Require at least Rack 1.1.0. Fixes #26.

  • Loading branch information...
1 parent ca59c65 commit 89af8c11670da1cffe3e4a03127e83fba2cef630 @rkh rkh committed Oct 9, 2010
Showing with 1 addition and 16 deletions.
  1. +0 −15 lib/sinatra/base.rb
  2. +1 −1 sinatra.gemspec
View
@@ -22,21 +22,6 @@ def accept
def secure?
(@env['HTTP_X_FORWARDED_PROTO'] || @env['rack.url_scheme']) == 'https'
end
-
- # Override Rack < 1.1's Request#params implementation (see lh #72 for
- # more info) and add a Request#user_agent method.
- # XXX remove when we require rack > 1.1
- if Rack.release < '1.1'
- def params
- self.GET.update(self.POST)
- rescue EOFError, Errno::ESPIPE
- self.GET
- end
-
- def user_agent
- @env['HTTP_USER_AGENT']
- end
- end
end
# The response object. See Rack::Response and Rack::ResponseHelpers for
View
@@ -100,7 +100,7 @@ Gem::Specification.new do |s|
s.test_files = s.files.select {|path| path =~ /^test\/.*_test.rb/}
s.extra_rdoc_files = %w[README.rdoc README.de.rdoc README.jp.rdoc README.fr.rdoc README.es.rdoc LICENSE]
- s.add_dependency 'rack', '>= 1.0'
+ s.add_dependency 'rack', '~> 1.1'
s.add_dependency 'tilt', '~> 1.1'
s.add_development_dependency 'rake'
s.add_development_dependency 'shotgun', '~> 0.6'

0 comments on commit 89af8c1

Please sign in to comment.