Module Ocsigen_headers

module Ocsigen_headers : sig..end

Getting informations from HTTP header.


This module uses the lowel level module Ocsigen_http_frame.Http_header. It is very basic and must be completed for exhaustiveness.

val find : string -> Ocsigen_http_frame.t -> string

find one of the values bound to name in the HTTP headers of the frame. Raise Not_found if it is not bound.

val find_all : string -> Ocsigen_http_frame.t -> string list

find all the values bound to name in the HTTP headers of the frame. Raise Not_found if it is not bound.

val get_keepalive : Ocsigen_http_frame.Http_header.http_header -> bool
val parse_cookies : string -> string Ocsigen_cookies.CookiesTable.t
val parse_mime_type : string -> string option * string option
val get_host_from_host_header : 
  Ocsigen_http_frame.t -> string option * int option
val get_user_agent : Ocsigen_http_frame.t -> string
val get_if_modified_since : Ocsigen_http_frame.t -> float option
val get_if_unmodified_since : Ocsigen_http_frame.t -> float option
val get_if_none_match : Ocsigen_http_frame.t -> string list option
val get_if_match : Ocsigen_http_frame.t -> string list option
val get_content_type : Ocsigen_http_frame.t -> string option
val parse_content_type : 
  string option -> ((string * string) * (string * string) list) option
val get_content_length : Ocsigen_http_frame.t -> int64 option
val get_referer : Ocsigen_http_frame.t -> string option
val get_referrer : Ocsigen_http_frame.t -> string option
val get_origin : Ocsigen_http_frame.t -> string option
val get_access_control_request_method : 
  Ocsigen_http_frame.t -> string option
val get_access_control_request_headers : 
  Ocsigen_http_frame.t -> string list option
val get_accept : 
  Ocsigen_http_frame.t ->
  ((string option * string option) * float option *
   (string * string) list)
  list
val get_accept_charset : 
  Ocsigen_http_frame.t -> (string option * float option) list
val get_accept_encoding : 
  Ocsigen_http_frame.t -> (string option * float option) list
val get_accept_language : 
  Ocsigen_http_frame.t -> (string * float option) list