mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Update handler selection to correctly convert WEBrick
This commit is contained in:
parent
ea3239c88f
commit
92aa941a04
1 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,8 @@ module Sinatra
|
||||||
def server
|
def server
|
||||||
options.server ||= defined?(Rack::Handler::Thin) ? "thin" : "mongrel"
|
options.server ||= defined?(Rack::Handler::Thin) ? "thin" : "mongrel"
|
||||||
# Convert the server into the actual handler name
|
# Convert the server into the actual handler name
|
||||||
handler = options.server.capitalize.sub(/cgi$/, 'CGI')
|
# Special cases for [Fast]CGI and WEBrick
|
||||||
|
handler = options.server.capitalize.sub(/cgi$/, 'CGI').sub(/^Webrick$/, 'WEBrick')
|
||||||
@server ||= eval("Rack::Handler::#{handler}")
|
@server ||= eval("Rack::Handler::#{handler}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue