Index of values


B
buf_of_inchan [Http_misc]
reads from an input channel till it End_of_file and returns what has been read; if limit is given returned buffer will contains at most first 'limit' bytes read from input channel
build_sockaddr [Http_misc]
build a Unix.sockaddr inet address from a string representation of an IP address and a port number

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
crlf [Http_constants]
"\r\n" string

D
daemon_spec [Http_daemon]
currified daemon_spec constructor.
date_822 [Http_misc]
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_addr [Http_constants]
default_auth [Http_constants]
default_auto_close [Http_constants]
default_callback [Http_constants]
default_exn_handler [Http_constants]
default_mode [Http_constants]
default_port [Http_constants]
default_root_dir [Http_constants]
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
default_timeout [Http_constants]

E
error [Http_misc]
print an error msg to stderr.
explode_sockaddr [Http_misc]
explode an _inet_ Unix.sockaddr address in a string representation of an IP address and a port number

F
filesize [Http_misc]
finally [Http_misc]
fork [Http_tcp_server]
multi process server

G
get [Http_user_agent]
get_basic_headers [Http_daemon]
returns the basic headers "Date", "Server" and "Connection" used in send_basic_headers
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]
heal_header [Http_parser_sanity]
heal_header_name [Http_parser_sanity]
heal_header_value [Http_parser_sanity]
http_version [Http_common]

I
init_socket [Http_tcp_server]
initialize a passive socket listening on given Unix.sockaddr
is_client_error [Http_common]
is_directory [Http_misc]
is_error [Http_common]
is_informational [Http_common]
is_redirection [Http_common]
is_server_error [Http_common]
is_success [Http_common]

L
list_assoc_all [Http_misc]
like List.assoc but return all bindings of a given key instead of the leftmost one only
ls [Http_misc]
given a dir handle

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

N
normalize_header_value [Http_parser_sanity]
remove heading and/or trailing LWS sequences as per RFC2616

P
parse_cookies [Http_parser]
parse a Cookie header, extracting an associative list <attribute name, attribute value>.
parse_headers [Http_parser]
parse HTTP headers.
parse_path [Http_parser]
parse the base path (removing query string, fragment, ....) from an URL
parse_query_get_params [Http_parser]
parse HTTP GET parameters from an URL; paramater which were passed with no value (like 'x' in "/foo.cgi?a=10&x=&c=9") are returned associated with the empty ("") string.
parse_request [Http_parser]
given an input channel, reads from it a GET HTTP request and
parse_request_fst_line [Http_parser]
parse 1st line of an HTTP request
parse_response_fst_line [Http_parser]
parse 1st line of an HTTP response
peername_of_in_channel [Http_misc]
as above but works on in_channels
peername_of_out_channel [Http_misc]
given an out_channel build on top of a socket, return peername related to that socket

R
reason_phrase_of_code [Http_misc]
given an HTTP response code return the corresponding reason phrase
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", "Server" and "Connection" 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
serve [Http_threaded_tcp_server]
serve an HTTP request for a multi threaded TCP server
server_string [Http_constants]
string returned as value of "Server:" response header
server_string [Http_common]
simple [Http_tcp_server]
single process server
sockname_of_in_channel [Http_misc]
as above but works on in_channels
sockname_of_out_channel [Http_misc]
given an out_channel build on top of a socket, return sockname related to that socket
split_query_params [Http_parser]
given an HTTP like query string (e.g.
status_of_code [Http_common]
converts an integer HTTP status to the corresponding status value
string_explode [Http_misc]
explode a string in a char list
string_implode [Http_misc]
implode a char list in a string
string_of_method [Http_common]
pretty print an HTTP method
string_of_url [Http_parser_sanity]
pretty print an URL
string_of_version [Http_common]
pretty print an HTTP version
strip_heading_slash [Http_misc]
strip heading '/', if any, from a string and
strip_trailing_slash [Http_misc]
strip trailing '/', if any, from a string and

T
thread [Http_tcp_server]
multi threaded server
token [Cookie_lexer]

U
url_of_string [Http_parser_sanity]
parse an URL from a string.

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

W
warn [Http_misc]
print a warning msg to stderr.