blob: 7ee5fe60195f89c0da9d83accb5d843f2a368516 [file] [log] [blame]
<html><head><title>CGI Script input</title></head><body><h1><img alt="" src="in_files/CGIlogo.gif"> CGI Script Input</h1>
For requests which have information attached after the header, such as
HTTP POST or PUT, the information will be sent to the script on stdin.
The server will send <a href="">CONTENT_LENGTH</a> bytes on
this file descriptor. Remember that it will give the <a href="">CONTENT_TYPE</a> of the data as well. The server is
in no way obligated to send end-of-file after the script reads
<code>CONTENT_LENGTH</code> bytes. </p><p>
Let's take a form with METHOD="POST" as an example. Let's say the form
results are 7 bytes encoded, and look like <code>a=b&amp;b=c</code>.
In this case, the server will set CONTENT_LENGTH to 7 and CONTENT_TYPE
to application/x-www-form-urlencoded. The first byte on the script's
standard input will be "a", followed by the rest of the encoded string.</p><p>
<a href=""><img alt="[Back]" src="in_files/back.gif">Return to the
interface specification</a> <p>
CGI - Common Gateway Interface
</p><address><a href=""></a></address>