rack-mount 0.4

This commit is contained in:
Joshua Peek 2009-12-26 12:43:50 -06:00
parent f53c36350d
commit 673fa7f066
3 changed files with 21 additions and 21 deletions

View File

@ -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'

View File

@ -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
} }

View File

@ -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)