Produce Full HTTP Response (QzhbCgiUtils) API

The QzhbCgiUtils() API allows a CGI program to produce a full HTTP 1.0/1.1 response for non-parsed header CGI programs. This API provides functionality similar to the cgiutils command used by other HTTP server platforms.

Required Parameter Group:
1 Command string Input Char(*)
2 Error code I/O Char(*)

Required parameter group

Command string
INPUT:CHAR(*)

The command string is a null ended string of flags and modifiers. Each flag must be separated by at least one space. The following flags are supported:

-nodate
Does not return the Date: header to the browser.
-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 only want the Expires: header.
-reason explanation
Specifies the reason line for the HTTP response. You can only use this flag with the -status flag. If the explanation text contains more than one word, you must enclose it in parentheses.
-ct [type/subtype]
Specifies MIME Content-Type header to return to the browser. If you omit the type/subtype, the MIME content type is set to the default text/plan.
-charset character-set
Used with the -ct flag to specify the charset tag associated with the text Content-Types.
-ce encoding
Specifies MIME Content-Encoding header to return to the browser.
-cl language-code
Specifies MIME Content-Language header to return to the browser.
-length nnn
Specifies MIME Content-Length header to return to the browser.
-expires Time-Spec
Specifies MIME Expires header to return to the browser. This flag specifies the time to live in any combination of years, months, days, hours, minutes, and seconds. The time must be enclosed in parentheses. For example:
-expires (2 days 12 hours)
-expires now
Produces an Expires: header that matches the Date: header to return to the browser.
-uri URI
Specifies the Universal Resource Identifier (URI) for the returned document. URI can be considered the same as URL.
-extra xxx: yyy
Specifies an extra header that cannot otherwise be specified.
Error Code
I/O:CHAR(*)

The structure in which to return error information. For the format of the structure and for details on how to process API errors, see the API error reporting topic in the IBM® i Information Center.

Error messages

CPF24B4 E
Severe Error while addressing parameter list.
CPF3C17 E
Error occurred with input data parameter.
CPF3CF1 E
Error code parameter not valid.