`sig
exception Ocsigen_http_error of (Ocsigen_http_frame.cookieset * int)
exception Ocsigen_Is_a_directory
exception Ocsigen_malformed_url
exception Ocsigen_Internal_Error of string
exception Bad_config_tag_for_extension of string
exception Error_in_config_file of string
val badconfig : ('a, unit, string, 'b) Pervasives.format4 -> 'a
type url_path = string list
val string_of_url_path : Ocsigen_extensions.url_path -> string
type virtual_host_part = Text of string * int | Wildcard
type virtual_hosts =
(Ocsigen_extensions.virtual_host_part list * int option) list
type file_info = {
tmp_filename : string;
filesize : int64;
raw_original_filename : string;
original_basename : string;
}
type client
val client_id : Ocsigen_extensions.client -> int
val client_connection :
Ocsigen_extensions.client -> Ocsigen_http_com.connection
type request_info = {
ri_url_string : string;
ri_url : Neturl.url;
ri_method : Ocsigen_http_frame.Http_header.http_method;
ri_protocol : Ocsigen_http_frame.Http_header.proto;
ri_ssl : bool;
ri_full_path_string : string;
ri_full_path : string list;
ri_sub_path : string list;
ri_sub_path_string : string;
ri_get_params_string : string option;
ri_host : string option;
ri_get_params : (string * string) list Lazy.t;
ri_initial_get_params : (string * string) list Lazy.t;
ri_post_params : (string * string) list Lwt.t Lazy.t;
ri_files : (string * Ocsigen_extensions.file_info) list Lwt.t Lazy.t;
ri_remote_inet_addr : Unix.inet_addr;
ri_remote_ip : string;
ri_remote_ip_parsed : Ocsigen_lib.ip_address Lazy.t;
ri_remote_port : int;
ri_server_port : int;
ri_user_agent : string;
ri_cookies_string : string option Lazy.t;
ri_cookies : string Ocsigen_http_frame.Cookievalues.t Lazy.t;
ri_ifmodifiedsince : float option;
ri_ifunmodifiedsince : float option;
ri_ifnonematch : string list;
ri_ifmatch : string list option;
ri_content_type : ((string * string) * (string * string) list) option;
ri_content_type_string : string option;
ri_content_length : int64 option;
ri_referer : string option Lazy.t;
ri_accept :
((string option * string option) * float option *
(string * string) list)
list Lazy.t;
ri_accept_charset : (string option * float option) list Lazy.t;
ri_accept_encoding : (string option * float option) list Lazy.t;
ri_accept_language : (string * float option) list Lazy.t;
ri_http_frame : Ocsigen_http_frame.t;
ri_extension_info : exn list;
ri_client : Ocsigen_extensions.client;
}
type answer =
Ext_found of (unit -> Ocsigen_http_frame.result Lwt.t)
| Ext_next of int
| Ext_stop_site of (Ocsigen_http_frame.cookieset * int)
| Ext_stop_host of (Ocsigen_http_frame.cookieset * int)
| Ext_stop_all of (Ocsigen_http_frame.cookieset * int)
| Ext_continue_with of
(Ocsigen_extensions.request_info * Ocsigen_http_frame.cookieset * int)
| Ext_retry_with of Ocsigen_extensions.request_info *
Ocsigen_http_frame.cookieset
| Ext_sub_result of Ocsigen_extensions.extension2
and request_state =
Req_not_found of (int * Ocsigen_extensions.request_info)
| Req_found of
(Ocsigen_extensions.request_info *
(unit -> Ocsigen_http_frame.result Lwt.t))
and extension2 =
(unit -> unit) ->
Ocsigen_http_frame.cookieset ->
Ocsigen_extensions.request_state ->
(Ocsigen_extensions.answer * Ocsigen_http_frame.cookieset) Lwt.t
type extension =
Ocsigen_extensions.request_state -> Ocsigen_extensions.answer Lwt.t
type parse_fun = Simplexmlparser.xml list -> Ocsigen_extensions.extension2
type parse_host
val register_extension :
?respect_pipeline:bool ->
(Ocsigen_extensions.virtual_hosts ->
Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension) ->
(Ocsigen_extensions.virtual_hosts ->
Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension) ->
(unit -> unit) -> (unit -> unit) -> (exn -> string) -> unit
val void_extension :
Ocsigen_extensions.virtual_hosts ->
Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension
val get_config : unit -> Simplexmlparser.xml list
val ri_of_url :
string ->
Ocsigen_extensions.request_info -> Ocsigen_extensions.request_info
type ud_string
val parse_user_dir : string -> Ocsigen_extensions.ud_string
val replace_user_dir :
Netstring_pcre.regexp -> Ocsigen_extensions.ud_string -> string -> string
val make_parse_site :
Ocsigen_extensions.url_path ->
string * string * int * int ->
(Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension) ->
Ocsigen_extensions.parse_fun
val parse_site_item :
Ocsigen_extensions.virtual_hosts ->
Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension
val parse_user_site_item :
Ocsigen_extensions.virtual_hosts ->
Ocsigen_extensions.url_path ->
string * string * int * int ->
Ocsigen_extensions.parse_host ->
Ocsigen_extensions.parse_fun ->
Simplexmlparser.xml -> Ocsigen_extensions.extension
val set_hosts :
(Ocsigen_extensions.virtual_hosts * Ocsigen_extensions.extension2) list ->
unit
val get_hosts :
unit ->
(Ocsigen_extensions.virtual_hosts * Ocsigen_extensions.extension2) list
val do_for_site_matching :
string option ->
int -> Ocsigen_extensions.request_info -> Ocsigen_http_frame.result Lwt.t
val get_number_of_connected : unit -> int
val incr_connected : unit -> unit
val decr_connected : unit -> unit
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 -> Ocsigen_extensions.client
end`