module Http_misc: sig
.. end
Helpers and other not better classified functions which should not be
exposed in the final API
val date_822 : unit -> string
Returns the current date compliant to RFC 1123, which updates RFC 822
zone info are retrieved from UTC
val is_directory : string -> bool
Returns true if 'name' is a directory on the file system, false otherwise
val filesize : string -> int
Returns the filesize of fname
val strip_trailing_slash : string -> string
strip trailing '/', if any, from a string and
Returns the new string
val strip_heading_slash : string -> string
strip heading '/', if any, from a string and
Returns the new string
val ls : Unix.dir_handle -> string list
given a dir handle
Returns a list of entries contained
val string_explode : string -> char list
explode a string in a char list
val string_implode : char list -> string
implode a char list in a string
val reason_phrase_of_code : int -> string
given an HTTP response code return the corresponding reason phrase
val build_sockaddr : string * int -> Unix.sockaddr
build a Unix.sockaddr inet address from a string representation of an IP
address and a port number
val explode_sockaddr : Unix.sockaddr -> string * int
explode an _inet_ Unix.sockaddr address in a string representation of an
IP address and a port number
val peername_of_out_channel : Pervasives.out_channel -> Unix.sockaddr
given an out_channel build on top of a socket, return peername related to
that socket
val peername_of_in_channel : Pervasives.in_channel -> Unix.sockaddr
as above but works on in_channels
val sockname_of_out_channel : Pervasives.out_channel -> Unix.sockaddr
given an out_channel build on top of a socket, return sockname related to
that socket
val sockname_of_in_channel : Pervasives.in_channel -> Unix.sockaddr
as above but works on in_channels
val buf_of_inchan : ?limit:int -> Pervasives.in_channel -> Buffer.t
reads from an input channel till it End_of_file and returns what has been
read; if limit is given returned buffer will contains at most first 'limit'
bytes read from input channel
val list_assoc_all : 'a -> ('a * 'b) list -> 'b list
like List.assoc but return all bindings of a given key instead of the
leftmost one only
val warn : string -> unit
print a warning msg to stderr. Adds trailing \n
val error : string -> unit
print an error msg to stderr. Adds trailing \n
val finally : (unit -> unit) -> ('a -> 'b) -> 'a -> 'b