1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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

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'
"(.*?)"