ocsigenserver

A full-featured and extensible Web server
IN THIS PACKAGE
exception Unknown_command
val register_command_function : ?prefix:string -> ( string -> string list -> unit Lwt.t ) -> unit
val get_command_function : unit -> ?prefix:string -> string -> string list -> unit Lwt.t
module Ocsigen_request_info : sig ... end
exception Ocsigen_http_error of Ocsigen_cookies.cookieset * int
exception Bad_config_tag_for_extension of string
exception Error_in_config_file of string
exception Error_in_user_config_file of string
val badconfig : ( 'a, unit, string, 'b ) Pervasives.format4 -> 'a
type virtual_hosts = (string * Netstring_pcre.regexp * int option) list
val hash_virtual_hosts : virtual_hosts -> int
val equal_virtual_hosts : virtual_hosts -> virtual_hosts -> bool
val host_match : virtual_hosts:virtual_hosts -> host:string option -> port:int -> bool
type do_not_serve = {
do_not_serve_regexps : string list;
do_not_serve_files : string list;
do_not_serve_extensions : string list;
}
exception IncorrectRegexpes of do_not_serve
val do_not_serve_to_regexp : do_not_serve -> Netstring_pcre.regexp
val join_do_not_serve : do_not_serve -> do_not_serve -> do_not_serve
type config_info = {
default_hostname : string;
default_httpport : int;
default_httpsport : int;
default_protocol_is_https : bool;
mime_assoc : Ocsigen_charset_mime.mime_assoc;
charset_assoc : Ocsigen_charset_mime.charset_assoc;
default_directory_index : string list;
list_directory_content : bool;
do_not_serve_404 : do_not_serve;
do_not_serve_403 : do_not_serve;
uploaddir : string option;
maxuploadfilesize : int64 option;
}
val client_id : client -> int
val client_connection : client -> Ocsigen_http_com.connection
type ifrange = Ocsigen_request_info.ifrange =
| IR_No
| IR_Ifunmodsince of float
| IR_ifmatch of string
type file_info = Ocsigen_request_info.file_info = {
tmp_filename : string;
filesize : int64;
raw_original_filename : string;
original_basename : string;
file_content_type : ((string * string) * (string * string) list) option;
}
and request = {
request_info : request_info;
request_config : config_info;
}
exception Ocsigen_Is_a_directory of Ocsigen_request_info.request_info -> Neturl.url
type answer =
| Ext_do_nothing
| Ext_found of unit -> Ocsigen_http_frame.result Lwt.t
| Ext_found_stop of unit -> Ocsigen_http_frame.result Lwt.t
| Ext_next of int
| Ext_stop_site of Ocsigen_cookies.cookieset * int
| Ext_stop_host of Ocsigen_cookies.cookieset * int
| Ext_stop_all of Ocsigen_cookies.cookieset * int
| Ext_continue_with of request * Ocsigen_cookies.cookieset * int
| Ext_retry_with of request * Ocsigen_cookies.cookieset
| Ext_sub_result of extension2
| Ext_found_continue_with of unit -> (Ocsigen_http_frame.result * request) Lwt.t
| Ext_found_continue_with' of Ocsigen_http_frame.result * request
and request_state =
| Req_not_found of int * request
| Req_found of request * Ocsigen_http_frame.result
and extension2 = ( unit -> unit ) -> Ocsigen_cookies.cookieset -> request_state -> (answer * Ocsigen_cookies.cookieset) Lwt.t
type extension = request_state -> answer Lwt.t
type parse_fun = Simplexmlparser.xml list -> extension2
type parse_host
type userconf_info = {
localfiles_root : string;
}
type parse_config = virtual_hosts -> config_info -> parse_config_aux
and parse_config_user = userconf_info -> parse_config
val register_extension : name:string -> ?fun_site:parse_config -> ?user_fun_site:parse_config_user -> ?begin_init:( unit -> unit ) -> ?end_init:( unit -> unit ) -> ?init_fun:( Simplexmlparser.xml list -> unit ) -> ?exn_handler:( exn -> string ) -> ?respect_pipeline:bool -> unit -> unit
module Configuration : sig ... end
val get_hostname : request -> string
val get_port : request -> int
val new_url_of_directory_request : request -> request_info -> Neturl.url
val ri_of_url : ?full_rewrite:bool -> string -> request_info -> request_info
exception NoSuchUser
type ud_string
val parse_user_dir : string -> ud_string
val replace_user_dir : Netstring_pcre.regexp -> ud_string -> string -> string
exception Not_concerned
val find_redirection : Netstring_pcre.regexp -> bool -> string -> bool -> string option -> int -> string option -> string -> string -> string
val make_parse_config : Ocsigen_lib.Url.path -> parse_config_aux -> parse_fun
val parse_config_item : parse_config
val parse_user_site_item : parse_config_user
val set_hosts : (virtual_hosts * config_info * extension2) list -> unit
val get_hosts : unit -> (virtual_hosts * config_info * extension2) list
val compute_result : ?previous_cookies:Ocsigen_cookies.cookieset -> ?awake_next_request:bool -> request_info -> Ocsigen_http_frame.result Lwt.t
val get_number_of_connected : unit -> int
val incr_connected : int -> unit
val decr_connected : unit -> unit Lwt.t
val wait_fewer_connected : int -> unit Lwt.t
val during_initialisation : unit -> bool
val start_initialisation : unit -> unit
val end_initialisation : unit -> unit
val get_numberofreloads : unit -> int
val get_init_exn_handler : unit -> exn -> string
val set_config : Simplexmlparser.xml list -> unit
val client_of_connection : Ocsigen_http_com.connection -> client
val get_server_address : request_info -> Unix.inet_addr * int
val sslsockets : Lwt_unix.file_descr list Pervasives.ref