Sha256: 2a35fde74e599e46254d24351d435f36dce623c993070bd9e8873640a80ad8d4

Contents?: true

Size: 822 Bytes

Versions: 1

Compression:

Stored size: 822 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

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

# * James Britt <james_b@neurogami.com>
# * George Moschovitis <gm@navel.gr>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.28.0 lib/nitro/adapter/cgi.rb