Module Ocsigen.Request
type ttype content_type = (string * string) * (string * string) listtype file_info = Multipart.file_info = {tmp_filename : string;filesize : int64;raw_original_filename : string;file_content_type : content_type option;
}type post_data = (string * string) list * (string * file_info) listtype client_conn = [ | `Inet of Ipaddr.t * int| `Unix of string| `Forwarded_for of string| `Unknown
]Type of connection used by the client. `Inet means the client connected through the Internet. `Forwarded_for means that the client connected through a proxy and carries the IP address reported in the HTTP headers.
val make :
?forward_ip:string list ->
?sub_path:string ->
?original_full_path:string ->
?request_cache:Polytables.t ->
?cookies_override:string Ocsigen_cookie_map.Map_inner.t ->
address:Config.Socket_type.t ->
port:int ->
ssl:bool ->
filenames:string list Stdlib.ref ->
client_conn:client_conn ->
body:Cohttp_lwt.Body.t ->
connection_closed:unit Lwt.t ->
Cohttp.Request.t ->
tval update :
?ssl:bool ->
?forward_ip:string list ->
?client_conn:client_conn ->
?sub_path:string ->
?meth:Cohttp.Code.meth ->
?get_params_flat:(string * string) list ->
?post_data:post_data option ->
?cookies_override:string Ocsigen_cookie_map.Map_inner.t ->
?full_rewrite:bool ->
?uri:Uri.t ->
t ->
tval to_cohttp : t -> Cohttp.Request.tval uri : t -> Uri.tval body : t -> Cohttp_lwt.Body.tval address : t -> Config.Socket_type.tval host : t -> string optionval meth : t -> Cohttp.Code.methval port : t -> intval ssl : t -> boolval version : t -> Cohttp.Code.versionval query : t -> string optionval get_params : t -> (string * string list) listval get_params_flat : t -> (string * string) listval path : t -> string listval path_string : t -> stringval sub_path : t -> string listval sub_path_string : t -> stringval original_full_path : t -> string listval original_full_path_string : t -> stringval header : t -> Ocsigen_http.Header.Name.t -> string optionval header_multi : t -> Ocsigen_http.Header.Name.t -> string listval add_header : t -> Ocsigen_http.Header.Name.t -> string -> tval cookies : t -> string Ocsigen_cookie_map.Map_inner.tval client_conn : t -> client_connThe way the client connects to the server (for example, its IP address if connected over the internet).
val client_conn_to_string : t -> stringA textual representation of client_conn suitable for use in logs.
val client_ip_to_string : t -> stringThe bare client IP address (no scheme prefix), suitable for the %h field of a Common/Combined access-log line. Returns "-" when the address is unknown.
val set_remote_user : t -> string -> unitset_remote_user r user records the name of the user authenticated for this request (typically by Authbasic). It is stored in the request cache and reported as the %u field of the access log.
val remote_user : t -> string optionThe user authenticated for this request, if any. See set_remote_user.
val forward_ip : t -> string listval content_type : t -> content_type optionval request_cache : t -> Polytables.tval tries : t -> intval incr_tries : t -> unitval timeofday : t -> float