Class: WEBrick::HTTPServlet::CGIHandler
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
AbstractServlet
|
|
Instance Chain:
self,
AbstractServlet
|
|
Inherits: |
WEBrick::HTTPServlet::AbstractServlet
|
Defined in: | lib/webrick/httpservlet/cgihandler.rb |
Overview
Servlet for handling ::WEBrick::CGI scripts
Example:
server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler,
'/path/to/my_script')
Class Method Summary
-
.new(server, name) ⇒ CGIHandler
constructor
Creates a new ::WEBrick::CGI script servlet for the script at
name
AbstractServlet - Inherited
.get_instance | Factory for servlet instances that will handle a request from |
.new | Initializes a new servlet for |
Instance Method Summary
AbstractServlet - Inherited
#do_GET | Raises a NotFound exception. |
#do_HEAD | Dispatches to do_GET. |
#do_OPTIONS | Returns the allowed HTTP request methods. |
#service | Dispatches to a |
#redirect_to_directory_uri | Redirects to a path ending in /. |
Constructor Details
.new(server, name) ⇒ CGIHandler
Creates a new ::WEBrick::CGI script servlet for the script at name
# File 'lib/webrick/httpservlet/cgihandler.rb', line 34
def initialize(server, name) super(server, name) @script_filename = name @tempdir = server[:TempDir] @cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}" end