Update handler selection to correctly convert WEBrick
This commit is contained in:
parent
ea3239c88f
commit
92aa941a04
|
@ -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 New Issue