Merge branch 'master' of github.com:sinatra/sinatra

This commit is contained in:
Konstantin Haase 2011-10-03 09:54:11 -07:00
commit b9d80ca159
1 changed files with 2 additions and 2 deletions

View File

@ -845,7 +845,7 @@ module Sinatra
return unless path.start_with?(public_dir) and File.file?(path)
env['sinatra.static_file'] = path
cache_control *settings.static_cache_control if settings.static_cache_control?
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, :disposition => nil
end
@ -1213,7 +1213,7 @@ module Sinatra
keys = []
if path.respond_to? :to_str
pattern = path.to_str.gsub(/[^\?\%\\\/\:\*\w]/) { |c| encoded(c) }
pattern.gsub! /((:\w+)|\*)/ do |match|
pattern.gsub!(/((:\w+)|\*)/) do |match|
if match == "*"
keys << 'splat'
"(.*?)"