<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/rack/handler.rb</filename>
    </added>
    <added>
      <filename>test/spec_rack_handler.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -103,8 +103,7 @@ else
   inner_app = Object.const_get(File.basename(config, '.rb').capitalize)
 end
 
-case server
-when nil
+unless server = Rack::Handler.get(server)
   # Guess.
   if ENV.include?(&quot;PHP_FCGI_CHILDREN&quot;)
     server = Rack::Handler::FastCGI
@@ -121,18 +120,6 @@ when nil
       server = Rack::Handler::WEBrick
     end
   end
-when &quot;mongrel&quot;
-  server = Rack::Handler::Mongrel
-when &quot;evented_mongrel&quot;
-  server = Rack::Handler::EventedMongrel
-when &quot;webrick&quot;
-  server = Rack::Handler::WEBrick
-when &quot;cgi&quot;
-  server = Rack::Handler::CGI
-when &quot;fastcgi&quot;
-  server = Rack::Handler::FastCGI
-else
-  server = Rack::Handler.const_get(server.capitalize)
 end
 
 p server  if $DEBUG</diff>
      <filename>bin/rackup</filename>
    </modified>
    <modified>
      <diff>@@ -26,6 +26,7 @@ module Rack
   autoload :CommonLogger, &quot;rack/commonlogger&quot;
   autoload :File, &quot;rack/file&quot;
   autoload :ForwardRequest, &quot;rack/recursive&quot;
+  autoload :Handler, &quot;rack/handler&quot;
   autoload :Lint, &quot;rack/lint&quot;
   autoload :Recursive, &quot;rack/recursive&quot;
   autoload :Reloader, &quot;rack/reloader&quot;
@@ -70,23 +71,4 @@ module Rack
   module Adapter
     autoload :Camping, &quot;rack/adapter/camping&quot;
   end
-
-  # *Handlers* connect web servers with Rack.
-  #
-  # Rack includes Handlers for Mongrel, WEBrick, FastCGI, CGI, SCGI
-  # and LiteSpeed.
-  #
-  # Handlers usually are activated by calling &lt;tt&gt;MyHandler.run(myapp)&lt;/tt&gt;.
-  # A second optional hash can be passed to include server-specific
-  # configuration.
-
-  module Handler
-    autoload :CGI, &quot;rack/handler/cgi&quot;
-    autoload :FastCGI, &quot;rack/handler/fastcgi&quot;
-    autoload :Mongrel, &quot;rack/handler/mongrel&quot;
-    autoload :EventedMongrel, &quot;rack/handler/evented_mongrel&quot;
-    autoload :WEBrick, &quot;rack/handler/webrick&quot;
-    autoload :LSWS, &quot;rack/handler/lsws&quot;
-    autoload :SCGI, &quot;rack/handler/scgi&quot;
-  end
 end</diff>
      <filename>lib/rack.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>aa2d5501e5f65820c5480552289d8d52ab0ba31e</id>
    </parent>
  </parents>
  <author>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </author>
  <url>http://github.com/chneukirchen/rack-mirror/commit/ed86dfd676dcb46e276b6906f017df514e5632f9</url>
  <id>ed86dfd676dcb46e276b6906f017df514e5632f9</id>
  <committed-date>2008-05-24T08:54:00-07:00</committed-date>
  <authored-date>2008-05-24T08:54:00-07:00</authored-date>
  <message>Allow handlers to register themselves with Rack::Handler.

darcs-hash:20080524155410-4fc50-e851f342c8bd7461dfb40c30575fec73d0fe380e.gz</message>
  <tree>0942c84f57f557d899fa767e06ca37a196563185</tree>
  <committer>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </committer>
</commit>
