module Cgi:(F)CGI high level functionssig..end
exception HttpError of int
module Request:sig..end
val register_script : ?max_conns:int ->
?max_reqs:int ->
?sockaddr:Unix.sockaddr -> (Request.t -> unit) -> unitregister_script fn once to register their
main function. This should be called last (nothing that follows
will be executed).
The exception Exit is caught and ignored. CamlGI.Cgi.HttpError
exceptions are turned into the appropriate error code. All
other exceptions provoke a internal server error and are logged
in the server error log.
max_conns : is the maximum of connections the web server
can make to this script (default: None).max_reqs : is the maximum of requests a web server can
multiplex through a given connection (default: None).sockaddr : the unix or the TCP/IP socket that the script
will use to communicate with the web server. By default, the
server uses Unix.stdin. For example, if your script is
listening on port 8888 on a possibly remote machine, you can
use Unix.ADDR_INET(Unix.inet_addr_any, 8888).
For FastCGI, the environment variable FCGI_WEB_SERVER_ADDRS may be used to specify a coma separated list of IP addresses from which the web server can connect. If not set, any address is accepted.
val random_sessionid : unit -> stringclass type template =object..end
exception Abort
type upload_data = {
|
upload_value : |
|
upload_filename : |
|
upload_content_type : |
cgi#upload method.class cgi :?post_max:int -> Request.t ->object..end
new cgi ?post_max r creates a cgi object for the request r.
module Cgi_args:sig..end
val cHTTP_CONTINUE : intval cHTTP_SWITCHING_PROTOCOLS : intval cHTTP_PROCESSING : intval cHTTP_OK : intval cHTTP_CREATED : intval cHTTP_ACCEPTED : intval cHTTP_NON_AUTHORITATIVE : intval cHTTP_NO_CONTENT : intval cHTTP_RESET_CONTENT : intval cHTTP_PARTIAL_CONTENT : intval cHTTP_MULTI_STATUS : intval cHTTP_MULTIPLE_CHOICES : intval cHTTP_MOVED_PERMANENTLY : intval cHTTP_MOVED_TEMPORARILY : intval cHTTP_SEE_OTHER : intval cHTTP_NOT_MODIFIED : intval cHTTP_USE_PROXY : intval cHTTP_TEMPORARY_REDIRECT : intval cHTTP_BAD_REQUEST : intval cHTTP_UNAUTHORIZED : intval cHTTP_PAYMENT_REQUIRED : intval cHTTP_FORBIDDEN : intval cHTTP_NOT_FOUND : intval cHTTP_METHOD_NOT_ALLOWED : intval cHTTP_NOT_ACCEPTABLE : intval cHTTP_PROXY_AUTHENTICATION_REQUIRED : intval cHTTP_REQUEST_TIME_OUT : intval cHTTP_CONFLICT : intval cHTTP_GONE : intval cHTTP_LENGTH_REQUIRED : intval cHTTP_PRECONDITION_FAILED : intval cHTTP_REQUEST_ENTITY_TOO_LARGE : intval cHTTP_REQUEST_URI_TOO_LARGE : intval cHTTP_UNSUPPORTED_MEDIA_TYPE : intval cHTTP_RANGE_NOT_SATISFIABLE : intval cHTTP_EXPECTATION_FAILED : intval cHTTP_UNPROCESSABLE_ENTITY : intval cHTTP_LOCKED : intval cHTTP_FAILED_DEPENDENCY : intval cHTTP_INTERNAL_SERVER_ERROR : intval cHTTP_NOT_IMPLEMENTED : intval cHTTP_BAD_GATEWAY : intval cHTTP_SERVICE_UNAVAILABLE : intval cHTTP_GATEWAY_TIME_OUT : intval cHTTP_VERSION_NOT_SUPPORTED : intval cHTTP_VARIANT_ALSO_VARIES : intval cHTTP_INSUFFICIENT_STORAGE : intval cHTTP_NOT_EXTENDED : intval cDOCUMENT_FOLLOWS : intval cPARTIAL_CONTENT : intval cMULTIPLE_CHOICES : intval cMOVED : intval cREDIRECT : intval cUSE_LOCAL_COPY : intval cBAD_REQUEST : intval cAUTH_REQUIRED : intval cFORBIDDEN : intval cNOT_FOUND : intval cMETHOD_NOT_ALLOWED : intval cNOT_ACCEPTABLE : intval cLENGTH_REQUIRED : intval cPRECONDITION_FAILED : intval cSERVER_ERROR : intval cNOT_IMPLEMENTED : intval cBAD_GATEWAY : intval cVARIANT_ALSO_VARIES : int