14.3 Results ProcessingThe CGI program returns its results to the server as a data stream representing (directly or indirectly) the goal of the request. The data stream consists of two parts: the header and the body. The header consists of one or more lines of text, and is separated from the body by a blank line. The body contains MIME-conforming data whose content type must be reflected in the header. The server recognizes the following header lines in the results data stream:
Any other headers in the result stream are passed unmodified by the server to the client. It is the responsibility of the CGI program to avoid including headers that clash with those used by HTTP. Direct ReturnThe server provides for the CGI program to return its results directly to the client, bypassing the server's "packaging" of the data stream for its information protocol. In this case, it is the responsibility of the CGI program to generate a complete message packaged for HTTP. The server looks at the results in the output file, and if the first line starts with "HTTP/1.0", it assumes that the results contain a complete HTTP response, and sends the results to the client without packaging. |
|