HTTP Explained Page 3
An HTTP transaction consists of a header followed optionally by an empty line and some data. The header will specify such things as the action required of the s erver, or the type of data being returned, or a status code.
The header lines received from the client, if any, are placed by th e server into the CGI environment variables with the prefix HTTP_ followed by the header name. Any - characters in the header name a re changed to _ characters. The server may exclude any headers which it has already processed, such as Authorization, Content-type, and Content-length.
The MIME types which the client will accept, as given by HTTP headers . Other protocols may need to get this information from elsewhere. Each item in this list should be separated by commas as per the H TTP spec.
Format: type/subtype, type/subtype
The browser the client is using to send th e request. General format:
- A sta
tus code that indicates whether the request was successful or not. Typical error codes indicate that the requested file was not foun
d, that the request was malformed, or that authentication is required to access the file.
- The data itself. Since HTTP is li
beral about sending documents of any format, it is ideal for transmitting multimedia such as graphics, audio, and video files.
It also sends back information about the object being returned.
HEADmethod, the media type that would have be en sent had the request been a
methodperformed. Robot agents should include this header so that the person responsible for runn ing the robot can be contacted if problems occur on the receiving end.
GETmethod to make it conditional: if the requested resource has not been modified since the time specifie d in this field, a copy of the resource will not be returned from the server; instead, a 304 (not modified) response will be returne d without any data.
Location: http://WWW.S tars.com/Tutorial/HTTP/index.htmlIf you want to reference another file on your own server, you should output a partial URL, such as the following:
Serverresponse header field contains information about the software used by the origin server to handle the request.