Sha256: 0c36e5720a01382ebfe36b400073b589c16d6124869ecd282904a34d76982efd
Contents?: true
Size: 793 Bytes
Versions: 2
Compression:
Stored size: 793 Bytes
Contents
require 'cgi' require 'stringio' require 'tempfile' #-- # Adapt the default CGI object to suit Nitro. #++ class CGI # :nodoc: all def env ENV end end # Speeds things up, more comaptible with OSX. Socket.do_not_reverse_lookup = true # No multi-threading. Og.thread_safe = false if defined?(Og) and Og.respond_to?(:thread_safe) module Nitro # A plain CGI adapter. To be used only in development # environments, this adapter is *extremely* slow for # live/production environments. This adapter is provided for # the sake of completeness. class CgiAdapter #-- # No need for connection pooling, CGI uses process. #++ def self.start(server) cgi = CGI.new Router.strip_path = cgi.env["SCRIPT_NAME"] Cgi.process(server, cgi, $stdin, $stdout) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.41.0 | lib/nitro/adapter/cgi.rb |
nitro-0.40.0 | lib/nitro/adapter/cgi.rb |