Returns a (possibly non-standard) CGI environment property.
If the property is not set, Not_found is be raised unless
the default argument is passed. The default argument
determines the result of the function in this case.

The method takes the case-sensitive name and returns the value
of the property. Usually, these properties have uppercase
names.

For example, cgi_gateway_interface returns the same as

cgi_property ~default:"" "GATEWAY_INTERFACE"

You cannot access the fields coming from the HTTP header. Use
the method input_header_field instead.

methodcgi_properties : (string * string) list

Return all properties as an associative list.

methodcgi_https : bool

A well-known extension is the HTTPS property. It indicates
whether a secure connection is used (SSL/TLS). This method
interprets this property and returns true if the connection is
secure. This method fails if there is a HTTPS property with
an unknown value.

Header of the incoming HTTP request.

#input_header_field ?default f returns the value of a field
f of the HTTP request header. The field name f is
case-insensitive; if the name is a compound name, the parts
are separated by "-", e.g. "content-length". If there are
several fields with the same name only the first field will be
returned.RaisesNot_found if the field does not exist, unless the
default argument is passed. The default argument is the
result of the function in this case.

methodmultiple_input_header_field : string -> string list

Returns the values of all fields with the passed name of the
request header.

methodinput_header_fields : (string * string) list

Returns the input header as (name,value) pairs. The names may
consist of lowercase or uppercase letters.

Response header

Returns the value of a field of the response header. If the
field does not exist, Not_found will be raised unless the
default argument is passed. The default argument determines
the result of the function in this case.

If there are several fields with the same name only the first
field will be returned.

The anonymous string is the name of the field. The name is
case-insensitive, and it does not matter whether it consists
of lowercase or uppercase letters. If the name is a compound
name, the parts are separated by "-", e.g. "content-length".

methodmultiple_output_header_field : string -> string list

Returns the values of all fields with the passed name of the
repsonse header.

methodoutput_header_fields : (string * string) list

Returns the output header as (name,value) pairs. The names may
consist of lowercase or uppercase letters.

methodset_output_header_field : string -> string -> unit

Sets the value of a field of the response header. The
previous value, if any, is overwritten. If there have been
multiple values, all values will be removed and replaced by
the single new value.

Sets the response status. This is by definition the same as
setting the Status output header field.

methodsend_output_header : unit -> unit

This method will encode and send the output header to the
output channel. Note that of the output_channel is
`Transactionnal (as opposed to `Direct), no output will
actually take place before you issue #commit_work() -- thus
a #rollback_work() will also rollback the headers as
expected.

The output channel transferring the response

The "raw" output channel. In general you should use instead
Netcgi.cgi#out_channnel which supports transactions (if you
choose to). Access to the "raw" channel is useful however,
for example for sending images or download of files (for which
transactions are not interesting but merely more work).