Banner showing base of Eiffel tower

Github

Download version 1.4.8: Windows or Linux

Network Library: Fast CGI Servlets

The Fast CGI Servlets library has 26 classes.

ECF: fast-cgi.ecf

An implementation of the Fast-CGI protocol for creating single and multi-threaded HTTP servlet services.

Directory: library/network/fast-cgi

. /request

. /request/record

. /service

. /servlet

. /socket/spec/unix

. /socket/spec/windows

request

FCGI_CONSTANTS

Fcgi constants

FCGI_HTTP_HEADERS

Fast-CGI HTTP headers and custom headers

FCGI_MEMORY_READER_WRITER

Memory reader/writer that can read Name-Value pair length encoded according to the Fast-CGI specification.

See: https://fast-cgi.github.io/spec#34-name-value-pairs

FCGI_REQUEST_BROKER

Broker object used to communicate with the web server across a supplied socket using the FastCGI binary protocol. It reads HTTP requests and write responses.

Further Information

Click on class link to see notes.

FCGI_REQUEST_PARAMETERS

HTTP parameters passed throught Fast CGI connection

Further Information

Click on class link to see notes.

request/record

FCGI_BEGIN_REQUEST_RECORD

The Web server sends a FCGI_BEGIN_REQUEST record to start a request. The contentData component of a FCGI_BEGIN_REQUEST record has the form:

typedef struct {
   unsigned char roleB1;
   unsigned char roleB0;
   unsigned char flags;
   unsigned char reserved[5];
} FCGI_BeginRequestBody;

See: https://fast-cgi.github.io/spec#51-fcgi_begin_request

FCGI_END_REQUEST_RECORD

The application sends a FCGI_END_REQUEST record to terminate a request, either because the application has processed the request or because the application has rejected the request.

The contentData component of a FCGI_END_REQUEST record has the form:

typedef struct {
   unsigned char appStatusB3;
   unsigned char appStatusB2;
   unsigned char appStatusB1;
   unsigned char appStatusB0;
   unsigned char protocolStatus;
   unsigned char reserved[3];
} FCGI_EndRequestBody;

FCGI_END_SERVICE_RECORD

The application sends a FCGI_END_REQUEST record to terminate a request, either because the application has processed the request or because the application has rejected the request.

FCGI_HEADER_RECORD

A FastCGI record consists of a fixed-length prefix followed by a variable number of content and padding bytes. See: https://fast-cgi.github.io/spec#33-records

typedef struct {
   unsigned char version;
   unsigned char type;
   unsigned char requestIdB1;
   unsigned char requestIdB0;
   unsigned char contentLengthB1;
   unsigned char contentLengthB0;
   unsigned char paddingLength;
   unsigned char reserved;
   unsigned char contentData[contentLength];
   unsigned char paddingData[paddingLength];
} FCGI_Record;

FCGI_PARAMETER_RECORD

FCGI_PARAMS is a stream record type used in sending name-value pairs from the Web server to the application. The name-value pairs are sent down the stream one after the other, in no specified order.

See: https://fast-cgi.github.io/spec#52-name-value-pair-streams-fcgi_params

FCGI_RECORD

Base class for reading and writing a Fast-CGI record

FCGI_STDOUT_CONTENT_RECORD

Content record for writing content to web server

FCGI_STRING_CONTENT_RECORD

FCGI_STDIN is a stream record type used in sending arbitrary data from the Web server to the application. FCGI_DATA is a second stream record type used to send additional data to the application.

FCGI_STDOUT and FCGI_STDERR are stream record types for sending arbitrary data and error data respectively from the application to the Web server.

See: https://fast-cgi.github.io/spec#53-byte-streams-fcgi_stdin-fcgi_data-fcgi_stdout-fcgi_stderr

service

FCGI_SEPARATE_SERVLET_SERVICE

A FCGI_SERVLET_SERVICE service operating in a separate thread.

FCGI_SERVICE_CONFIG

Servlet service configuration parsed from Pyxis format

Further Information

Click on class link to see notes.

FCGI_SERVLET_REQUEST

Fast-CGI servlet request

FCGI_SERVLET_RESPONSE

Fcgi servlet response

FCGI_SERVLET_SERVICE

Fast-CGI service that services HTTP requests forwarded by a web server from a table of servlets. The service is configured from a Pyxis format configuration file and listens either on a port number or a Unix socket for request from the web server.

Further Information

Click on class link to see notes.

FCGI_SETTABLE_FROM_SERVLET_REQUEST

Object that is reflectively settable from {FCGI_SERVLET_REQUEST}.method_parameters

servlet

FCGI_DIVERGENT_SERVLET

Experimental servlet with service procedure that distributes requests to procedures in service_procedures_table according to the request path base name, i.e. the last directory step: request.dir_path.base

Works best if the web server URL matching rule is a regular expression.

FCGI_HTTP_SERVLET

Fcgi http servlet

FCGI_IP_ECHO_SERVLET

Fcgi ip echo servlet

FCGI_OK_SERVLET

Servlet that returns OK as a response.

socket/spec/unix

FCGI_DEBUGGING_STREAM_SOCKET

Socket that can help debug network protocols

FCGI_SOCKET_FACTORY

Unix implemenation of socket factory for FCGI service

socket/spec/windows

FCGI_SOCKET_FACTORY

Windows implemenation of socket factory for FCGI service