# Module Netcgi_common.Cookie

    module Cookie: sig .. end

    type t = Nethttp.Cookie.t

    val make : ?max_age:int ->
           ?domain:string ->
           ?path:string ->
           ?secure:bool ->
           ?comment:string ->
           ?comment_url:string ->
           ?ports:int list -> string -> string -> t

    val name : t -> string

    val value : t -> string

    val max_age : t -> int option

The expiration time of the cookie, in seconds. `None` means that the cookie will be discarded when the browser exits. This information is not returned by the browser.

    val domain : t -> string option

    val path : t -> string option

    val secure : t -> bool

Tells whether the cookie is secure. This information is not returned by the browser.

    val comment : t -> string

Returns the comment associated to the cookie or `""` if it does not exists. This information is not returned by the browser.

    val comment_url : t -> string

Returns the comment URL associated to the cookie or `""` if it does not exists. This information is not returned by the browser.

    val ports : t -> int list option

    val set_value : t -> string -> unit

    val set_max_age : t -> int option -> unit

    val set_domain : t -> string option -> unit

    val set_path : t -> string option -> unit

    val set_secure : t -> bool -> unit

    val set_comment : t -> string -> unit

    val set_comment_url : t -> string -> unit

    val set_ports : t -> int list option -> unit

    val set : #Netmime.mime_header -> t list -> unit

`set http_header cookies` sets the `cookies` in `http_header` using version 0 or version 1 depending on whether version 1 fields are used. For better browser compatibility, if "Set-cookie2" (RFC 2965) is issued, then a "Set-cookie" precedes (declaring the same cookie with a limited number of options).

Deprecated name. Use `Nethttp.Header.set_set_cookie_ct`.

    val get : #Netmime.mime_header -> t list

Decode the cookie header, may they be version 0 or 1.

Deprecated name. Use `Nethttp.Header.get_cookie_ct`.

    val of_record : Nethttp.cookie -> t

Conversion from the deprecated style of cookie.

Deprecated name. Use `Nethttp.Cookie.of_netscape_cookie`.

    val to_record : t -> Nethttp.cookie

Conversion to the deprecated style of cookie (some parameters are dropped).

Deprecated name. Use `Nethttp.Cookie.to_netscape_cookie`.