mount_proc

mount_proc(dir, proc=nil, &block) Instance Public methods Mounts proc or block on dir and calls it with a WEBrick::HTTPRequest and WEBrick::HTTPResponse

mount

mount(dir, servlet, *options) Instance Public methods Mounts servlet on dir passing options to the servlet at creation time

lookup_server

lookup_server(req) Instance Public methods Finds the appropriate virtual host to handle req

do_OPTIONS

do_OPTIONS(req, res) Instance Public methods The default OPTIONS request handler says GET, HEAD, POST and OPTIONS requests are allowed.

access_log

access_log(config, req, res) Instance Public methods Logs req and res in the access logs. config is used for the server name.

new

new(config={}, default=Config::HTTP) Class Public methods Creates a new HTTP server according to config An HTTP server uses the following attributes: :AccessLog An array of access logs. See WEBrick::AccessLog :BindAddress Local address for the server to bind to :DocumentRoot Root path to serve files from :DocumentRootOptions Options for the default HTTPServlet::FileHandler :HTTPVersion The HTTP version of this server :Port Port to listen on :RequestCallback Cal

status_line

status_line() Instance Public methods The response's HTTP status line

status=

status=(status) Instance Public methods Sets the response's status to the status code

set_redirect

set_redirect(status, url) Instance Public methods Redirects to url with a WEBrick::HTTPStatus::Redirect status. Example: res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect

set_error

set_error(ex, backtrace=false) Instance Public methods Creates an error page for exception ex with an optional backtrace