Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

Module Netcgi.Argument


module Argument: sig .. end
Operations on arguments and lists of thereof.

exception Oversized
val simple : string -> string -> Netcgi.cgi_argument
simple_arg name value creates an unstructured CGI argument called name with contents value.
val mime : ?work_around_backslash_bug:bool ->
?name:string -> Netmime.mime_message -> Netcgi.cgi_argument
mime_arg ?name msg creates a MIME-structured CGI argument called name with contents msg. You can create msg by either Netmime.memory_mime_message or Netmime.file_mime_message.
work_around_backslash_bug : Whether to work around a bug found in almost all browsers regarding the treatment of backslashes. The browsers do not quote backslashes in file names. This breaks RFC standards, however. This argument is true by default.
name : set the name of the argument. If it is not given, the name is extracted from the "Content-Disposition" field of the msg header or it "" if this field is not found.

It is easy to manipulate lists of arguments with the List module. For example, List.filter (fun a -> a#name <> n) args will remove from args all occurrences of the argument with name n. The following functions are helpers for operations specific to arguments.
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
set new_args args creates a list of argument from args deleting the arguments whose name appears in new_args and adding the new_args arguments.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml