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
1 changed files with 2 additions and 1 deletions

View File

@ -119,7 +119,8 @@ module Sinatra
def server
options.server ||= defined?(Rack::Handler::Thin) ? "thin" : "mongrel"
# 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}")
end