sig
class type cgi_argument =
object
method charset : string
method content_type :
unit -> string * (string * Mimestring.s_param) list
method filename : string option
method finalize : unit -> unit
method name : string
method open_value_rd : unit -> Netchannels.in_obj_channel
method representation :
[ `MIME of Netmime.mime_message | `Simple of Netmime.mime_body ]
method store : [ `File of string | `Memory ]
method value : string
end
module Argument :
sig
exception Oversized
val simple : string -> string -> Netcgi.cgi_argument
val mime :
?work_around_backslash_bug:bool ->
?name:string -> Netmime.mime_message -> Netcgi.cgi_argument
val clone :
?name:string ->
?value:string ->
?msg:Netmime.mime_message ->
Netcgi.cgi_argument -> Netcgi.cgi_argument
val set :
Netcgi.cgi_argument list ->
Netcgi.cgi_argument list -> Netcgi.cgi_argument list
end
class type rw_cgi_argument =
object
method charset : string
method content_type :
unit -> string * (string * Mimestring.s_param) list
method filename : string option
method finalize : unit -> unit
method name : string
method open_value_rd : unit -> Netchannels.in_obj_channel
method open_value_wr : unit -> Netchannels.out_obj_channel
method representation :
[ `MIME of Netmime.mime_message | `Simple of Netmime.mime_body ]
method ro : bool
method set_value : string -> unit
method store : [ `File of string | `Memory ]
method value : string
end
class simple_argument : ?ro:bool -> string -> string -> rw_cgi_argument
class mime_argument :
?work_around_backslash_bug:bool ->
string -> Netmime.mime_message -> rw_cgi_argument
module Cookie :
sig
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 -> Netcgi.Cookie.t
val name : Netcgi.Cookie.t -> string
val value : Netcgi.Cookie.t -> string
val domain : Netcgi.Cookie.t -> string option
val path : Netcgi.Cookie.t -> string option
val ports : Netcgi.Cookie.t -> int list option
val max_age : Netcgi.Cookie.t -> int option
val secure : Netcgi.Cookie.t -> bool
val comment : Netcgi.Cookie.t -> string
val comment_url : Netcgi.Cookie.t -> string
val set_value : Netcgi.Cookie.t -> string -> unit
val set_max_age : Netcgi.Cookie.t -> int option -> unit
val set_domain : Netcgi.Cookie.t -> string option -> unit
val set_path : Netcgi.Cookie.t -> string option -> unit
val set_secure : Netcgi.Cookie.t -> bool -> unit
val set_comment : Netcgi.Cookie.t -> string -> unit
val set_comment_url : Netcgi.Cookie.t -> string -> unit
val set_ports : Netcgi.Cookie.t -> int list option -> unit
val of_netscape_cookie : Nethttp.netscape_cookie -> Netcgi.Cookie.t
val to_netscape_cookie : Netcgi.Cookie.t -> Nethttp.netscape_cookie
end
type http_method = [ `DELETE | `GET | `HEAD | `POST | `PUT ]
type config =
Netcgi_common.config = {
tmp_directory : string;
tmp_prefix : string;
permitted_http_methods : Netcgi.http_method list;
permitted_input_content_types : string list;
input_content_length_limit : int;
workarounds :
[ `Backslash_bug
| `MSIE_Content_type_bug
| `Work_around_MSIE_Content_type_bug
| `Work_around_backslash_bug ] list;
default_exn_handler : bool;
}
val default_config : Netcgi.config
class type cgi_environment =
object
method cgi_auth_type : string
method cgi_gateway_interface : string
method cgi_https : bool
method cgi_path_info : string
method cgi_path_translated : string
method cgi_properties : (string * string) list
method cgi_property : ?default:string -> string -> string
method cgi_query_string : string
method cgi_remote_addr : string
method cgi_remote_host : string
method cgi_remote_ident : string
method cgi_remote_user : string
method cgi_request_method : string
method cgi_script_name : string
method cgi_server_name : string
method cgi_server_port : int option
method cgi_server_protocol : string
method cgi_server_software : string
method config : Netcgi.config
method cookie : string -> Netcgi.Cookie.t
method cookies : Netcgi.Cookie.t list
method input_content_length : int
method input_content_type :
unit -> string * (string * Mimestring.s_param) list
method input_content_type_string : string
method input_header : Netmime.mime_header
method input_header_field : ?default:string -> string -> string
method input_header_fields : (string * string) list
method log_error : string -> unit
method multiple_input_header_field : string -> string list
method multiple_output_header_field : string -> string list
method out_channel : Netchannels.out_obj_channel
method output_ch : Netchannels.out_obj_channel
method output_header : Netmime.mime_header
method output_header_field : ?default:string -> string -> string
method output_header_fields : (string * string) list
method protocol : Nethttp.protocol
method send_output_header : unit -> unit
method set_multiple_output_header_field : string -> string list -> unit
method set_output_header_field : string -> string -> unit
method set_output_header_fields : (string * string) list -> unit
method set_status : Nethttp.http_status -> unit
method user_agent : string
end
type other_url_spec = [ `Env | `None | `This of string ]
type query_string_spec =
[ `Args of Netcgi.rw_cgi_argument list
| `Env
| `None
| `This of Netcgi.cgi_argument list ]
type cache_control = [ `Max_age of int | `No_cache | `Unspecified ]
class type cgi =
object
method argument : string -> Netcgi.cgi_argument
method argument_exists : string -> bool
method argument_value : ?default:string -> string -> string
method arguments : Netcgi.cgi_argument list
method at_exit : (unit -> unit) -> unit
method environment : Netcgi.cgi_environment
method finalize : unit -> unit
method multiple_argument : string -> Netcgi.cgi_argument list
method out_channel : Netchannels.trans_out_obj_channel
method output : Netchannels.trans_out_obj_channel
method request_method :
[ `DELETE | `GET | `HEAD | `POST | `PUT of Netcgi.cgi_argument ]
method set_header :
?status:Nethttp.http_status ->
?content_type:string ->
?content_length:int ->
?set_cookie:Nethttp.cookie list ->
?set_cookies:Netcgi.Cookie.t list ->
?cache:Netcgi.cache_control ->
?filename:string ->
?language:string ->
?script_type:string ->
?style_type:string ->
?fields:(string * string list) list -> unit -> unit
method set_redirection_header :
?set_cookies:Netcgi.Cookie.t list ->
?fields:(string * string list) list -> string -> unit
method url :
?protocol:Nethttp.protocol ->
?with_authority:Netcgi.other_url_spec ->
?with_script_name:Netcgi.other_url_spec ->
?with_path_info:Netcgi.other_url_spec ->
?with_query_string:Netcgi.query_string_spec -> unit -> string
end
class type cgi_activation = cgi
type output_type =
[ `Direct of string
| `Transactional of
Netcgi.config ->
Netchannels.out_obj_channel -> Netchannels.trans_out_obj_channel ]
val buffered_transactional_outtype : Netcgi.output_type
val buffered_transactional_optype : Netcgi.output_type
val tempfile_transactional_outtype : Netcgi.output_type
val tempfile_transactional_optype : Netcgi.output_type
type arg_store =
Netcgi.cgi_environment ->
string ->
Netmime.mime_header_ro ->
[ `Automatic
| `Automatic_max of float
| `Discard
| `File
| `File_max of float
| `Memory
| `Memory_max of float ]
type exn_handler = Netcgi.cgi_environment -> (unit -> unit) -> unit
type connection_directive =
[ `Conn_close
| `Conn_close_linger
| `Conn_error of exn
| `Conn_keep_alive ]
end