Index of values


C
callback [Http_daemon.Trivial]
callback function, exposed if you like to use it as a basis to define a more powerful daemon
code_of_status [Http_common]
converts an HTTP status to the corresponding integer value

D
daemon_spec [Http_daemon]
currified daemon_spec constructor.
debug [Http_common]
whether debugging messages are enabled or not, can be changed at runtime
debug_print [Http_common]
print a string on stderr only if debugging is enabled
default_spec [Http_daemon]
default daemon specification: listen on 0.0.0.0, port 80, "always ok" callback (return an empty response, response code 200), fork a child for each request, do not change to a root directory (i.e. keep cwd), 300 seconds timeout, ignores exceptions, no authentication required, do not automatically close client connections after callback

G
get [Http_user_agent]
get_iter [Http_user_agent]
as above but iter callback function on HTTP response's body instead of returning it as a string

H
head [Http_user_agent]
http_version [Http_common]
see Http_constants.version

I
is_client_error [Http_common]
is_error [Http_common]
is_informational [Http_common]
is_redirection [Http_common]
is_server_error [Http_common]
is_success [Http_common]

M
main [Http_daemon.Trivial]
start the "trivial" HTTP daemon
main [Http_daemon]
start an HTTP daemon
method_of_string [Http_common]
parse an HTTP method from a string

R
respond [Http_daemon]
high level response function, respond on outchan sending: basic headers (including Content-Length computed using 'body' argument), headers probided via 'headers' argument, body given via 'body' argument.
respond_error [Http_daemon]
send an "error" response (i.e.
respond_file [Http_daemon]
tipical static pages http daemon behaviour, if requested url is a file, return it, it it is a directory return a directory listing of it
respond_forbidden [Http_daemon]
send a 403 (forbidden) HTTP response
respond_not_found [Http_daemon]
send a 404 (not found) HTTP response
respond_redirect [Http_daemon]
send a "redirection" class response, optional body argument contains data that will be displayed in the body of the response, default response status is 301 (moved permanently), only redirection status are accepted by this function, other values will raise Failure
respond_unauthorized [Http_daemon]
respond with a 401 (Unauthorized) response asking for authentication against given realm (default is the server name)
respond_with [Http_daemon]
respond using a prebuilt Http_types.response object

S
send_CRLF [Http_daemon]
send a CRLF sequence on the given output channel, this is mandatory after the last header was sent and before start sending the response body
send_basic_headers [Http_daemon]
like send_status_line but additionally will also send "Date" and "Server" standard headers
send_file [Http_daemon]
send a file through an out_channel
send_header [Http_daemon]
send an HTTP header on outchan
send_headers [Http_daemon]
as send_header, but for a list of pairs <header, value>
send_status_line [Http_daemon]
send response status line, version is the http version used in response, either code or status must be given (not both, not none) which represent the HTTP response code, outchan is the output channel to which send status line
server_string [Http_common]
see Http_constants.server_string
status_of_code [Http_common]
converts an integer HTTP status to the corresponding status value
string_of_method [Http_common]
pretty print an HTTP method
string_of_version [Http_common]
pretty print an HTTP version

V
version_of_string [Http_common]
parse an HTTP version from a string