Raised by some functions/exceptions when a feature of the old model cannot be implemented in the new model or vice versa
This is not used anywhere. Moreover this is protocol dependent.
This is not the business of the user. Rather than to
document #set_input_state
as such, we prefer not to
allow the user to have access to it at the first
place...
This is not used anywhere. Moreover "non-parsed header" is not supported by all connectors.
This is not the business of the user. In the new API, it is handled transparently.
The Work_around_
part has been dropped as it is clear at
the spot of use.
#
tmp_directory
| : string | ; | |||
#
tmp_prefix
| : string | ; | |||
#
permitted_http_methods
| : string list | ; | (* | Now has type [`GET | `HEAD | `POST | `DELETE | `PUT] list
for coherence with Netcgi.cgi#request_method . | *) |
#
permitted_input_content_types
| : string list | ; | |||
#
input_content_length_limit
| : int | ; | |||
#
workarounds
| : workaround list | ; |
Now simply called Netcgi.config.
Portage: of_compat_config c
transform the old configuration c
into one suitable for the new interface.
Portage: to_compat_config c
transform the new configuration c
into one suitable for the old interface.
I rest to be convinced we need this. Is it provided by web
servers different from Apache? Why is the #url
method not
enough?
Type now is unit -> string * (string * Mimestring.s_param)
list
to be coherent with Netmime.mime_header_ro.
out_channel
by analogy with the
standard library -- even though it is a "channel object".
Portage: to_compat_environment e
converts the new environment
e
to the old interface.
Portage: of_compat_environment e
converts the old environment
e
to the new interface.
Embedded in the single place of use.
Irrelevant: there are no methods to mutate an argument.
Method content_type : unit -> string * (string *
Mimestring.s_param) list
defined instead of content_type
and content_type_params
to be coherent with
Netmime.mime_header_ro -- yet as easy to use.
Dealing with the arguments is the task of an higher order
library. In fact, it is generally misleading to think
arguments as mutable because one must accomodate the back
button -- so cache, history,... will use the "initial args".
Moreover, the only place where mutability is interesting is
the #url
method which -- as already remarked -- can be
dealt with in a purely functional way.
The new interface contains commodity functions to update lists of arguments (see Netcgi.Argument).
Portage: In addition to defining a type, the following
cgi_argument
also defines a conversion function that allows to
connect old scripts to the new infrastructure. Finalizing
cgi_argument a
will also finalize a
.
Portage: to_compat_argument a
converts a new style argument
a
to an old style one. Finalizing to_compat_argument a
will also
finalize a
.
Portage: of_compat_argument a
converts an old style argument
a
to a new style one. Finalizing of_compat_argument a
will also
finalize a
.
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.
out_channel
for coherence with the
standard library --- this is also to avoid
cgi#output#output ...
which looks odd.
Added ?content_length
for user convenience and deprecated
?set_cookie
in favor of ?set_cookies
for coherence
e.g. with ?fields
.
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.
Portage: to_compat_activation
converts a new style
cgi object to an old cgi_activation object.
Portage: of_compat_activation
converts an old style
cgi_activation to a new CGI-like object.