Use the cgiutils command in no-parse header programs to produce a full HTTP 1.0 response.
cgiutils -Flag [Modifier]
If Modifier contains blanks, enclose it in quotation marks ("").
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
cgiutils -ce x-compress
cgiutils -cl en_UK
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.
cgiutils -expires "1 year 3 months 2 weeks 4 days 12 hours 30 mins"
cgiutils -status 200 -reason "Virtual doc follows" -expires now
This might produce headers similar to these:
HTTP/1.0 200 Virtual doc follows MIME-Version: 1.0 Server: IBM-ICS Date: Tue, 05 Jan 1996 03:43:46 GMT Expires: Tue, 05 Jan 1996 03:43:46 GM
The cgiutils command automatically produces the Server: header because it is available in the CGI environment. The Date: field is also automatically generated unless the -nodate flag is specified.
This includes a blank line after the output to mark the end of the MIME header section. If you want to follow this with some more headers yourself, use the -noel (NO-Empty-Line) flag as shown in the next example.
cgiutils -noel -expires "2 days" -nodate
HTTP/1.0 200 Virtual doc follows MIME-Version: 1.0 Server: IBM-ICS Expires: Tue, 07 Jan 1996 03:43:46 GMT