Module Http_frame


module Http_frame: sig .. end
This table is to store cookie values for each path. The key has type url_path option: it is for the path (default: root of the site),

type etag = string 
type url_path = string list 
module Cookies: Map.S 
  with type key = url_path
This table is to store cookie values for each path.
module Cookievalues: Map.S 
  with type key = string
This table is to store one cookie value for each cookie name.

type cookie =
| OSet of float option * string
| OUnset
Type used for cookies to set. The float option is the timestamp for the expiration date. The string is the value.
type cookieset = cookie Cookievalues.t Cookies.t 
val add_cookie : url_path ->
string -> cookie -> cookieset -> cookieset
val add_cookies : cookie Cookievalues.t Cookies.t ->
cookie Cookievalues.t Cookies.t ->
cookie Cookievalues.t Cookies.t
val compute_new_ri_cookies : float ->
string list ->
string Cookievalues.t ->
cookie Cookievalues.t Cookies.t ->
string Cookievalues.t

type result = {
   res_cookies : cookieset; (*cookies to set*)
   res_lastmodified : float option; (*Default: None*)
   res_etag : etag option;
   res_code : int; (*HTTP code, if not 200*)
   res_stream : string Ocsistream.t; (*Default: empty stream*)
   res_content_length : int64 option; (*None means Transfer-encoding: chunked*)
   res_content_type : string option;
   res_headers : Http_headers.t; (*The headers you want to add*)
   res_charset : string option; (*Default: None*)
   res_location : string option; (*Default: None*)
}
The type of answers to send
val default_result : unit -> result
Default result to use as a base for constructing others.
val empty_result : unit -> result
result for an empty page.
module type HTTP_CONTENT = sig .. end
module Http_header: sig .. end
module Http_error: sig .. end

type t = {
   header : Http_header.http_header;
   content : string Ocsistream.t option;
}