1
0
Fork 0
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:
Markus Prinz 2008-06-05 14:40:34 +02:00
parent ea3239c88f
commit 92aa941a04

View file

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