Module Env


module Env: sig .. end
Environment

exception Query_string_too_big
Raise when building the environment and the query string is too long, for example when uploading a file too big, or many files.
type argument_name = string 

type argument_value = {
   arg_value : string option;
   arg_filename : string option;
   arg_content_type : string option;
}
type argument_binding = argument_name * argument_value 

type cgi_env = {
   mutable arguments : argument_binding list;
   auth_type : string;
   content_length : int;
   content_type : string;
   cookies : (string * string) list;
   document_root : string;
   enc_type : string;
   gateway_interface : string;
   http_accept : string;
   http_user_agent : string;
   path : string;
   path_info : string;
   path_translated : string;
   mutable query_string : string;
   remote_addr : string;
   remote_host : string;
   remote_ident : string;
   remote_user : string;
   request_method : string;
   server_admin : string;
   server_name : string;
   server_port : int;
   server_protocol : string;
   server_software : string;
   script_filename : string;
   script_name : string;
   script_uri : string;
}
val get_cgi_env : unit -> cgi_env
Collect cgi arguments and return them in a cgi_env value, setting up the query string, according to the method of the cgi.
val string_of_cgi_args : argument_binding list -> string
Map cgi arguments to a string.