Type:
Class
Constants:
CRLF
:
"\r\n"
HTTP_PROTO
:
"HTTP/1.0"
SERVER_NAME
:
"HttpServer (Ruby #{RUBY_VERSION})"
DEFAULT_HEADER
:
{
"Server" => SERVER_NAME
}
Default header for the server name
StatusCodeMapping
:
{
200 => "OK",
400 => "Bad Request",
403 => "Forbidden",
405 => "Method Not Allowed",
411 => "Length Required",
500 => "Internal Server Error"
}
Mapping of status codes and error messages
Implements a simple HTTP-server by using John W. Small's (jsmall@laser.net) ruby-generic-server: GServer.