File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module Benchmark
1515 class Server < Sinatra ::Base
1616
1717 def self . run
18- Rack ::Handler ::WEBrick . run (
18+ Rackup ::Handler ::WEBrick . run (
1919 Benchmark ::Server . new ,
2020 :Port => 9292 ,
2121 :AccessLog => [ ] ,
Original file line number Diff line number Diff line change 44# #--
55
66require 'rack'
7+ require 'rackup/handler/webrick'
78
89module Stallion
910 class Mount
@@ -16,7 +17,7 @@ def ride
1617 end
1718
1819 def match? ( request )
19- method = request [ 'REQUEST_METHOD' ]
20+ method = request . respond_to? ( :params ) ? request . params [ 'REQUEST_METHOD' ] : request [ 'REQUEST_METHOD' ]
2021 @methods . empty? or @methods . include? ( method )
2122 end
2223 end
@@ -56,9 +57,9 @@ def self.run(options = {})
5657
5758 ruby_version = RUBY_VERSION . split ( '.' ) . map ( &:to_i )
5859 if ruby_version [ 0 ] >= 3
59- Rack ::Handler ::Mongrel . run ( Rack ::Lint . new ( self ) , **options )
60+ Rackup ::Handler ::WEBrick . run ( Rack ::Lint . new ( self ) , **options )
6061 else
61- Rack ::Handler ::Mongrel . run ( Rack ::Lint . new ( self ) , options )
62+ Rackup ::Handler ::WEBrick . run ( Rack ::Lint . new ( self ) , options )
6263 end
6364 end
6465
You can’t perform that action at this time.
0 commit comments