package ocsigenserver

  1. Overview
  2. Docs
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) 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 = {
  1. do_not_serve_regexps : string list;
  2. do_not_serve_files : string list;
  3. 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 = {
  1. default_hostname : string;
  2. default_httpport : int;
  3. default_httpsport : int;
  4. default_protocol_is_https : bool;
  5. mime_assoc : Ocsigen_charset_mime.mime_assoc;
  6. charset_assoc : Ocsigen_charset_mime.charset_assoc;
  7. default_directory_index : string list;
  8. list_directory_content : bool;
  9. do_not_serve_404 : do_not_serve;
  10. do_not_serve_403 : do_not_serve;
  11. uploaddir : string option;
  12. maxuploadfilesize : int64 option;
}
val client_id : client -> int
val client_connection : client -> Ocsigen_http_com.connection
type ifrange = Ocsigen_request_info.ifrange =
  1. | IR_No
  2. | IR_Ifunmodsince of float
  3. | IR_ifmatch of string
type file_info = Ocsigen_request_info.file_info = {
  1. tmp_filename : string;
  2. filesize : int64;
  3. raw_original_filename : string;
  4. original_basename : string;
  5. file_content_type : ((string * string) * (string * string) list) option;
}
and request = {
  1. request_info : request_info;
  2. request_config : config_info;
}
exception Ocsigen_Is_a_directory of Ocsigen_request_info.request_info -> Neturl.url
type answer =
  1. | Ext_do_nothing
  2. | Ext_found of unit -> Ocsigen_http_frame.result Lwt.t
  3. | Ext_found_stop of unit -> Ocsigen_http_frame.result Lwt.t
  4. | Ext_next of int
  5. | Ext_stop_site of Ocsigen_cookies.cookieset * int
  6. | Ext_stop_host of Ocsigen_cookies.cookieset * int
  7. | Ext_stop_all of Ocsigen_cookies.cookieset * int
  8. | Ext_continue_with of request * Ocsigen_cookies.cookieset * int
  9. | Ext_retry_with of request * Ocsigen_cookies.cookieset
  10. | Ext_sub_result of extension2
  11. | Ext_found_continue_with of unit -> (Ocsigen_http_frame.result * request) Lwt.t
  12. | Ext_found_continue_with' of Ocsigen_http_frame.result * request
and request_state =
  1. | Req_not_found of int * request
  2. | Req_found of request * Ocsigen_http_frame.result
type extension = request_state -> answer Lwt.t
type parse_fun = Xml.xml list -> extension2
type parse_host
type userconf_info = {
  1. localfiles_root : string;
}
type parse_config = virtual_hosts -> config_info -> parse_config_aux
and parse_config_user = userconf_info -> parse_config
and parse_config_aux = Ocsigen_lib.Url.path -> parse_host -> parse_fun -> Xml.xml -> extension
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:(Xml.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 : Xml.xml list -> unit
val client_of_connection : Ocsigen_http_com.connection -> client
val get_server_address : request_info -> Unix.inet_addr * int
val sockets : Lwt_unix.file_descr list ref
val sslsockets : Lwt_unix.file_descr list ref
OCaml

Innovation. Community. Security.