cgiutils command

Purpose

Use the cgiutils command in no-parse header programs to produce a full HTTP 1.0 response.

Note:
If you want to supply your own no-parse header (nph) programs specifically to return your own return values, the name of the program must begin with nph-. This prevents the server header from overriding your return value with the standard server return value.

Format

cgiutils -Flag [Modifier]

If Modifier contains blanks, enclose it in quotation marks ("").

Parameters

-version
Returns version information.
-nodate
Does not return the Date: header.
-noel
Does not return a blank line after headers. This is useful if you want other MIME headers after the initial header lines.
-status nnn
Returns full HTTP response with status code nnn, instead of only a set of HTTP headers. Do not use this flag if you want only the Expires: header.
-reason explanation
Specifies the reason line for the HTTP response. You can use only this flag with the -status nnn flag.
-ct [type/subtype]
Specifies MIME Content-Type header. This example specifies a MIME content type of text/html:
   cgiutils -ct text/html

If you omit the type/subtype, the MIME content type is set to the default text/plain. This example sets the MIME content type to text/plain.

   cgiutils -ct
-ce encoding
Specifies MIME Content-Encoding header. For example:
   cgiutils -ce  x-compress
-cl language-code
Specifies MIME Content-Language header. For example:
   cgiutils -cl en_UK
-length nnn
Specifies MIME Content-Length header.
-expires Time-Spec
Specifies MIME Expires: header. This flag specifies the time to live (the expiration date of a document) in any combination of days, hours, minutes, and seconds. This is the length of time a document is considered valid. For example:
   cgiutils -expires 2 days 12 hours

The cgiutils command adds the time you specify to the current Greenwich Mean Time to determine the expiration date. The expiration date is put in the Expires: header in the HTTP format.

-expires now
Produces an Expires: header that matches the Date: header.
-uri URI
Specifies the Universal Resource Identifier (URI) for the returned document. URI can be considered to be the same as URL.
-extra xxx: yyy
Specifies an extra header that cannot otherwise be specified for the cgiutils command.

Examples