Class: WEBrick::HTTPServlet::CGIHandler (Ruby 2.7.5)
Description: Class : WEBrick::HTTPServlet::CGIHandler - Ruby 2.7.5

### Home Classes Methods

### In Files

- webrick/httpservlet/cgihandler.rb

### Parent

WEBrick::HTTPServlet::AbstractServlet

### Methods

- ::new

### Class/Module Index

Quicksearch

- Errno
- Errno::ECONNABORTED
- Errno::ECONNRESET
- Errno::EPROTO
- Object
- WEBrick
- WEBrick::AccessLog
- WEBrick::AccessLog::AccessLogError
- WEBrick::BasicLog
- WEBrick::CGI
- WEBrick::Config
- WEBrick::Cookie
- WEBrick::Daemon
- WEBrick::GenericServer
- WEBrick::HTMLUtils
- WEBrick::HTTPAuth
- WEBrick::HTTPAuth::Authenticator
- WEBrick::HTTPAuth::BasicAuth
- WEBrick::HTTPAuth::DigestAuth
- WEBrick::HTTPAuth::Htdigest
- WEBrick::HTTPAuth::Htgroup
- WEBrick::HTTPAuth::Htpasswd
- WEBrick::HTTPAuth::ProxyAuthenticator
- WEBrick::HTTPAuth::ProxyBasicAuth
- WEBrick::HTTPAuth::ProxyDigestAuth
- WEBrick::HTTPAuth::UserDB
- WEBrick::HTTPProxyServer
- WEBrick::HTTPRequest
- WEBrick::HTTPResponse
- WEBrick::HTTPResponse::InvalidHeader
- WEBrick::HTTPServer
- WEBrick::HTTPServerError
- WEBrick::HTTPServlet
- WEBrick::HTTPServlet::AbstractServlet
- WEBrick::HTTPServlet::CGIHandler
- WEBrick::HTTPServlet::DefaultFileHandler
- WEBrick::HTTPServlet::ERBHandler
- WEBrick::HTTPServlet::FileHandler
- WEBrick::HTTPServlet::HTTPServletError
- WEBrick::HTTPServlet::ProcHandler
- WEBrick::HTTPStatus
- WEBrick::HTTPStatus::ClientError
- WEBrick::HTTPStatus::EOFError
- WEBrick::HTTPStatus::Error
- WEBrick::HTTPStatus::Info
- WEBrick::HTTPStatus::Redirect
- WEBrick::HTTPStatus::ServerError
- WEBrick::HTTPStatus::Status
- WEBrick::HTTPStatus::Success
- WEBrick::HTTPUtils
- WEBrick::HTTPUtils::FormData
- WEBrick::HTTPVersion
- WEBrick::Log
- WEBrick::SNIRequest
- WEBrick::ServerError
- WEBrick::SimpleServer
- WEBrick::Utils
- WEBrick::Utils::TimeoutHandler

No matching classes.

# WEBrick::HTTPServlet::CGIHandler

Servlet for handling `CGI` scripts

Example:

    server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler,
                 '/path/to/my_script')

### Public Class Methods

new(server, name) click to toggle source

Creates a new `CGI` script servlet for the script at `name`

                   # File webrick/httpservlet/cgihandler.rb, line 36
    def initialize(server, name)
      super(server, name)
      @script_filename = name
      @tempdir = server[:TempDir]
      interpreter = server[:CGIInterpreter]
      if interpreter.is_a?(Array)
        @cgicmd = CGIRunnerArray + interpreter
      else
        @cgicmd = "#{CGIRunner} #{interpreter}"
      end
    end