<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -118,8 +118,14 @@ module Sinatra
 
   def server
     options.server ||= defined?(Rack::Handler::Thin) ? &quot;thin&quot; : &quot;mongrel&quot;
+
     # Convert the server into the actual handler name
-    handler = options.server.capitalize.sub(/cgi$/, 'CGI')
+    handler = options.server.capitalize
+
+    # If the convenience conversion didn't get us anything, 
+    # fall back to what the user actually set.
+    handler = options.server unless Rack::Handler.const_defined?(handler)
+
     @server ||= eval(&quot;Rack::Handler::#{handler}&quot;)
   end
   </diff>
      <filename>lib/sinatra.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ea3239c88f8a85f82cc891589bc6ad1c339719e8</id>
    </parent>
  </parents>
  <author>
    <name>Chris Schneider</name>
    <email>chris@christopher-schneider.com</email>
  </author>
  <url>http://github.com/cschneid/sinatra/commit/b404b0a78e26bb9ccddfe655ba45072e97c6db7d</url>
  <id>b404b0a78e26bb9ccddfe655ba45072e97c6db7d</id>
  <committed-date>2008-06-07T22:24:32-07:00</committed-date>
  <authored-date>2008-06-07T22:18:07-07:00</authored-date>
  <message>Small tweak to server method to fall back on exactly what the user sets via 'set :server, handler' if Rack::Handler::Thing doesn't exist.  This lets special capitalziation cases like FastCGI, CGI, and WEBrick be handled easily.</message>
  <tree>4355a98512fdeb5eb4b5421ba9c574e99b70992a</tree>
  <committer>
    <name>Chris Schneider</name>
    <email>chris@christopher-schneider.com</email>
  </committer>
</commit>
