Next: Processing input from
Up: Standard utilities
Previous: The cgiparse program
The cgiutils program is a standard CERN server utility used
to create a set of valid HTTP headers as part of the script's required
output. If no argument or an invalid argument is given,
cgiutils will print a terse summary of its command line
options. The valid options are:
- -nodate
- Suppresses the output of a Date header field.
- -noel
- Suppress the blank line after the headers (no empty line).
- -status nn
- Generates a full HTTP version 1.0 response
including a status line, MIME version field, and Date field
(unless the -nodate option was specified).
- -expires when
- Generates an Expires header
field. The value when can be the keyword now, or
can contain a number which, if unqualified, is interpreted as
seconds. Keywords can be appended to numbers to specify different
units of time, for example:
cgiutils -expires '3 months 12 hours'
- -ct type/subtype
- Generate a Content-Type header field.
- -ce encoding
- Generate a Content-Encoding and a
Content-transfer-encoding header field.
- -length nn
- Generate a Content-Length field.
A Server header field is printed with the values of the
SERVER_SOFTWARE CGI environment variable.
For example, executing the following command line:
cgiutils -status 200 -ct text/plain -expires now
from a script invoked from the CERN server will generate the following
headers:
HTTP/1.0 200 OK
MIME-Version: 1.0
Server: CERN/3.0
Date: Monday, 14-Nov-94 18:11:51 GMT
Content-Type: text/plain
Expires: Monday, 14-Nov-94 18:11:51 GMT
Next: Processing input from
Up: Standard utilities
Previous: The cgiparse program
Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the
LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout
using the Template Toolkit. The document is mainly of historical
interest as obviously many of the sites mentioned have long since
disappeared.
|