sig
type etag = string
val compute_new_ri_cookies :
float ->
string list ->
string Ocsigen_pervasives.String.Table.t ->
Ocsigen_cookies.cookie Ocsigen_pervasives.String.Table.t
Ocsigen_cookies.Cookies.t -> string Ocsigen_pervasives.String.Table.t
type result = {
res_cookies : Ocsigen_cookies.cookieset;
res_lastmodified : float option;
res_etag : Ocsigen_http_frame.etag option;
res_code : int;
res_stream :
string Ocsigen_stream.t *
(string Ocsigen_stream.t -> int64 -> string Ocsigen_stream.step Lwt.t)
option;
res_content_length : int64 option;
res_content_type : string option;
res_headers : Http_headers.t;
res_charset : string option;
res_location : string option;
}
val default_result : unit -> Ocsigen_http_frame.result
val empty_result : unit -> Ocsigen_http_frame.result
module type HTTP_CONTENT =
sig
type t
type options
val result_of_content :
?options:Ocsigen_http_frame.HTTP_CONTENT.options ->
Ocsigen_http_frame.HTTP_CONTENT.t -> Ocsigen_http_frame.result Lwt.t
val get_etag :
?options:Ocsigen_http_frame.HTTP_CONTENT.options ->
Ocsigen_http_frame.HTTP_CONTENT.t -> Ocsigen_http_frame.etag option
end
module Http_header :
sig
type http_method =
GET
| POST
| HEAD
| PUT
| DELETE
| TRACE
| OPTIONS
| CONNECT
| LINK
| UNLINK
| PATCH
type http_mode =
Query of (Ocsigen_http_frame.Http_header.http_method * string)
| Answer of int
| Nofirstline
type proto = HTTP10 | HTTP11
type http_header = {
mode : Ocsigen_http_frame.Http_header.http_mode;
proto : Ocsigen_http_frame.Http_header.proto;
headers : Http_headers.t;
}
val get_firstline :
Ocsigen_http_frame.Http_header.http_header ->
Ocsigen_http_frame.Http_header.http_mode
val get_headers :
Ocsigen_http_frame.Http_header.http_header -> Http_headers.t
val get_headers_value :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name -> string
val get_headers_values :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name -> string list
val get_proto :
Ocsigen_http_frame.Http_header.http_header ->
Ocsigen_http_frame.Http_header.proto
val add_headers :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name ->
string -> Ocsigen_http_frame.Http_header.http_header
end
module Http_error :
sig
exception Http_exception of int * string option * Http_headers.t option
val expl_of_code : int -> string
val display_http_exception : exn -> unit
val string_of_http_exception : exn -> string
end
type t = {
frame_header : Ocsigen_http_frame.Http_header.http_header;
frame_content : string Ocsigen_stream.t option;
frame_abort : unit -> unit Lwt.t;
}
end