Class: HttpServer

Inherits:
GServer
  • Object
show all
Defined in:
lib/xmlrpc/httpserver.rb

Defined Under Namespace

Classes: Request, Response, Table

Constant Summary collapse

CRLF =

Constants -----------------------------------------------

"\r\n"
HTTP_PROTO =
"HTTP/1.0"
SERVER_NAME =
"HttpServer (Ruby #{RUBY_VERSION})"
DEFAULT_HEADER =
{
  "Server" => SERVER_NAME
}
StatusCodeMapping =

Mapping of status code and error message

{
  200 => "OK",
  400 => "Bad Request",
  403 => "Forbidden",
  405 => "Method Not Allowed",
  411 => "Length Required",
  500 => "Internal Server Error"
}

Instance Method Summary collapse

Constructor Details

#initialize(handle_obj, port = 8080, host = DEFAULT_HOST, maxConnections = 4, stdlog = $stdout, audit = true, debug = true) ⇒ HttpServer

handle_obj specifies the object, that receives calls to request_handler and ip_auth_handler



18
19
20
21
22
# File 'lib/xmlrpc/httpserver.rb', line 18

def initialize(handle_obj, port = 8080, host = DEFAULT_HOST, maxConnections = 4, 
               stdlog = $stdout, audit = true, debug = true)
  @handler = handle_obj
  super(port, host, maxConnections, stdlog, audit, debug)
end