This is used to give the server an HTTP/1.0 <ahref="http://www.w3.org/hypertext/WWW/Protocols/HTTP/HTRESP.html">status
line</a> to send to the client. The format is <code>nnn xxxxx</code>,
where <code>nnn</code> is the 3-digit status code, and
<code>xxxxx</code> is the reason string, such as "Forbidden".</p><p>
</p></li></ul>
<hr>
<h2>Examples</h2>
Let's say I have a fromgratz to HTML converter. When my converter is
finished with its work, it will output the following on stdout (note
that the lines beginning and ending with --- are just for illustration
and would not be output): <p>
</p><pre>--- start of output ---
Content-type: text/html
--- end of output ---
</pre>
Note the blank line after Content-type. <p>
Now, let's say I have a script which, in certain instances, wants to
return the document <code>/path/doc.txt</code> from this server just
as if the user had actually requested
<code>http://server:port/path/doc.txt</code> to begin with. In this
case, the script would output: </p><p>
</p><pre>--- start of output ---
Location: /path/doc.txt
--- end of output ---
</pre>
The server would then perform the request and send it to the client.
<p>
Let's say that I have a script which wants to reference our gopher
server. In this case, if the script wanted to refer the user to
<code>gopher://gopher.ncsa.uiuc.edu/</code>, it would output: </p><p>
</p><pre>--- start of output ---
Location: gopher://gopher.ncsa.uiuc.edu/
--- end of output ---
</pre>
Finally, I have a script which wants to talk to the client directly.
In this case, if the script is referenced with <ahref="http://hoohoo.ncsa.uiuc.edu/cgi/env.html#protocol"><code>SERVER_PROTOCOL</code></a> of HTTP/1.0,
the script would output the following HTTP/1.0 response: <p>
</p><pre>--- start of output ---
HTTP/1.0 200 OK
Server: NCSA/1.0a6
Content-type: text/plain
This is a plaintext document generated on the fly just for you.
--- end of output ---
</pre>
<hr>
<ahref="http://hoohoo.ncsa.uiuc.edu/cgi/interface.html"><imgalt="[Back]"src="out_files/back.gif">Return to the