mirror of https://github.com/rails/rails
rack-mount 0.4
This commit is contained in:
parent
f53c36350d
commit
673fa7f066
|
@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
||||||
s.add_dependency('activemodel', '= 3.0.pre')
|
s.add_dependency('activemodel', '= 3.0.pre')
|
||||||
s.add_dependency('rack', '~> 1.1.0')
|
s.add_dependency('rack', '~> 1.1.0')
|
||||||
s.add_dependency('rack-test', '~> 0.5.0')
|
s.add_dependency('rack-test', '~> 0.5.0')
|
||||||
s.add_dependency('rack-mount', '~> 0.3.3')
|
s.add_dependency('rack-mount', '~> 0.4.0')
|
||||||
s.add_dependency('erubis', '~> 2.6.5')
|
s.add_dependency('erubis', '~> 2.6.5')
|
||||||
|
|
||||||
s.require_path = 'lib'
|
s.require_path = 'lib'
|
||||||
|
|
|
@ -19,9 +19,9 @@ module ActionDispatch
|
||||||
|
|
||||||
@constraints.each { |constraint|
|
@constraints.each { |constraint|
|
||||||
if constraint.respond_to?(:matches?) && !constraint.matches?(req)
|
if constraint.respond_to?(:matches?) && !constraint.matches?(req)
|
||||||
return [ 417, {}, [] ]
|
return [ 404, {'X-Cascade' => 'pass'}, [] ]
|
||||||
elsif constraint.respond_to?(:call) && !constraint.call(req)
|
elsif constraint.respond_to?(:call) && !constraint.call(req)
|
||||||
return [ 417, {}, [] ]
|
return [ 404, {'X-Cascade' => 'pass'}, [] ]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ module ActionDispatch
|
||||||
prepare_params!(params)
|
prepare_params!(params)
|
||||||
|
|
||||||
unless controller = controller(params)
|
unless controller = controller(params)
|
||||||
return [417, {}, []]
|
return [404, {'X-Cascade' => 'pass'}, []]
|
||||||
end
|
end
|
||||||
|
|
||||||
controller.action(params[:action]).call(env)
|
controller.action(params[:action]).call(env)
|
||||||
|
|
Loading…
Reference in New Issue