From 92aa941a04ea914923a99fa4bed5443440b9e1e6 Mon Sep 17 00:00:00 2001 From: Markus Prinz Date: Thu, 5 Jun 2008 14:40:34 +0200 Subject: [PATCH] Update handler selection to correctly convert WEBrick --- lib/sinatra.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sinatra.rb b/lib/sinatra.rb index f3544823..4d48f386 100644 --- a/lib/sinatra.rb +++ b/lib/sinatra.rb @@ -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