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.

http_resp
  • References/Ruby on Rails/Ruby/Classes/HttpServer

http_resp(status_code, status_message=nil, header=nil, body=nil) Instance Private methods

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/HttpServer

new(handle_obj, port = 8080, host = DEFAULT_HOST, maxConnections = 4, stdlog = $stdout, audit = true, debug = true)

2025-01-10 15:47:30
content_length
  • References/Ruby on Rails/Ruby/Classes/HttpServer/HttpServer::Request

content_length() Instance Public methods

2025-01-10 15:47:30
writeTo
  • References/Ruby on Rails/Ruby/Classes/HttpServer/HttpServer::Table

writeTo(port) Instance Public methods Output the

2025-01-10 15:47:30