module Cookies_based: functor (
C
:
Conf
) ->
sig
.. end
A functor to create the module with the functions
to manage sessions between pages using cookies.
type
user_id = C.t
type
arg = string * string
An argument for a page
type
handler = Ows.hostname ->
(user_id * string) option ->
arg list -> Toolhtml.doc
A handler is a function to call for a given page.
The function takes
- the hostname of the client,
- an option pair
(user_id, sid)
if the user is identified
(with a session), then sid
is the sessions id,
- the list of arguments of the page.
Then the function returns an HTML document.
val cookies_actions : Ows.cookie_action list Pervasives.ref
The cookies to set or unset in the reply.
val register : Ows.page -> handler -> unit
Register a page handler.
val arg_of_page : Ows.page -> string
Take a page name and build the code to append to an url
to go to this page.
val cgibin : unit -> string
Return the cgi-bin url.
val cgibin_of_page : Ows.page -> string
Take a page name a return the cgi-bin url to go to that page.
val handle : handler -> unit
Handle the required page (according to the value of the variable for the page
in the url. This is the function to call at the end of the program.
The default handler is given in argument.