lib/rack/handler/fastcgi.rb in rack-0.2.0 vs lib/rack/handler/fastcgi.rb in rack-0.3.0
- old
+ new
@@ -1,10 +1,12 @@
require 'fcgi'
module Rack
module Handler
class FastCGI
- def self.run(app, options=nil)
+ def self.run(app, options={})
+ file = options[:File] and STDIN.reopen(UNIXServer.new(file))
+ port = options[:Port] and STDIN.reopen(TCPServer.new(port))
FCGI.each { |request|
serve request, app
}
end