Class

A CGI library using WEBrick requests and responses.

Example:

class MyCGI < WEBrick::CGI
  def do_GET req, res
    res.body = 'it worked!'
    res.status = 200
  end
end

MyCGI.new.start
Constants

The CGI error exception class

Attributes
Read

The CGI configuration. This is based on WEBrick::Config::HTTP

Read

The CGI logger

Class Methods

Creates a new CGI interface.

The first argument in args is a configuration hash which would update WEBrick::Config::HTTP.

Any remaining arguments are stored in the @options instance variable for use by a subclass.

Instance Methods

Reads key from the configuration

Services the request req which will fill in the response res. See WEBrick::HTTPServlet::AbstractServlet#service for details.

Starts the CGI process with the given environment env and standard input and output stdin and stdout.