Simple Common Gateway Interface - Specification - Request Format

Request Format

A request consists of a number of headers and a body. The format of the headers is:

headers ::= header* header ::= name NUL value NUL name ::= notnull+ value ::= notnull* notnull ::= <01> | <02> | <03> | … | NUL = <00>

Duplicate names are not allowed in the headers. The first header must have the name "CONTENT_LENGTH" and a value that is the length of the body in decimal. The "CONTENT_LENGTH" header must always be present, even if its value is "0". There must also always be a header with the name "SCGI" and a value of "1". In order to facilitate the transition from CGI, standard CGI environment variables should be provided as SCGI headers.

The headers are sent to the server application encoded as a netstring. The body is sent following the headers and its length is specified by the "CONTENT_LENGTH" header.

Read more about this topic:  Simple Common Gateway Interface, Specification

Famous quotes containing the word request:

    Were all the worshippers of the gold calf to memorialize me and request a restoration of the deposits I would cut my right hand from my body before I would do such an act. The gold calf may be worshipped by others but as for myself I serve the Lord.
    Andrew Jackson (1767–1845)