Ocamlnet 3 Reference Manual : Netcgi1_compat.Netcgi_types.cgi_activation

# Class type Netcgi1_compat.Netcgi_types.cgi_activation

    class type cgi_activation = object .. end

Portage: In addition to defining a type, the following `cgi_activation` also defines a conversion function that allows to connect old scripts to the new infrastructure. Renamed simply `cgi` as this is the main cgi-like abstraction.

    method environment : Netcgi1_compat.Netcgi_env.cgi_environment

    method request_method : request_method

    method initial_arguments : (string * cgi_argument) list

    method initial_argument : string -> cgi_argument

    method initial_argument_value : ?default:string -> string -> string

    method initial_multiple_argument : string -> cgi_argument list

    method arguments : (string * cgi_argument) list

Mutability of arguments has been dropped. We indeed believe that how to deal with arguments is the role of a higher level library, so it is unconvenient that they are mutable (force copying even if unecessary). `Netcgi.Argument` has a few helper functions to help manipulating lists of immutable arguments. Moreover, mutable arguments send the wrong message to the user (imagine one wants to keep a cache of args -> response) and unnecessarily complicate the interface.

It has type `argument list` as the name is redundant and this is better suited for the `Netcgi.query_string_spec` optional arguments.

    method argument : string -> cgi_argument

    method argument_value : ?default:string -> string -> string

    method multiple_argument : string -> cgi_argument list

    method set_arguments : ?fin:bool -> cgi_argument list -> unit

    method update_argument : ?fin:bool -> cgi_argument -> unit

    method update_multiple_argument : ?fin:bool -> cgi_argument list -> unit

    method delete_argument : ?fin:bool -> string -> unit

    method url : ?protocol:Netcgi1_compat.Netcgi_env.protocol ->
           ?with_authority:other_url_spec ->
           ?with_script_name:other_url_spec ->
           ?with_path_info:other_url_spec ->
           ?with_query_string:query_string_spec ->
           unit -> string

    method output : Netchannels.trans_out_obj_channel

Deprecated.in favor of `out_channel` for coherence with the standard library --- this is also to avoid `cgi#output#output ...` which looks odd.

    method set_header : ?status:status ->
           ?content_type:string ->
           ?cache:cache_control ->
           ?filename:string ->
           ?language:string ->
           ?script_type:string ->
           ?style_type:string ->
           ?set_cookie:cgi_cookie list ->
           ?fields:(string * string list) list -> unit -> unit

Added `?content_length` for user convenience and deprecated `?set_cookie` in favor of `?set_cookies` for coherence e.g. with `?fields`.

    method set_redirection_header : string -> unit

    method finalize : unit -> unit