Simple Common Gateway Interface (SCGI)

Created on 2021-01-30T17:23:13-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Encoding

Rules:

Example

Content-Type: application/x-blobcat
Content-Length: 6
Henlo.

First the headers are flattened:

CONTENT_LENGTH <00> 6 <00>
CONTENT-TYPE <00> application/x-blobcat <00>

Then wrapped in a netstring:

68:CONTENT_LENGTH<00>6<00>CONTENT-TYPE<00>application/x-blobcat<00>,

And the content of the message follows:

68:CONTENT_LENGTH<00>6<00>CONTENT-TYPE<00>application/x-blobcat<00>,
Henlo.

Response

An SCGI client sends the raw response including HTTP or Gemini headers and closes the socket.