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:
commit
b9d80ca159
1 changed files with 2 additions and 2 deletions
|
@ -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'
|
||||
"(.*?)"
|
||||
|
|
Loading…
Reference in a new issue