Enum tokio_fastcgi::Role
source · pub enum Role {
Responder,
Authorizer,
Filter,
}
Expand description
Enum containing the role that is requested from the FastCGI client. See the different variants for a description of the roles and their input and output streams.
Variants§
Responder
A FastCGI responder receives all the information associated with an HTTP request and generates an HTTP response. A responder receives the following information from the web-server:
- Environment variables (see
get_param
/get_str_param
) - StdIn (see
get_stdin
)
A responder has the following communication channels at its disposal:
- Result code (see
RequestResult
) - StdOut (see
get_stdout
) - StdErr (see
get_stderr
)
see the FastCGI specification for more Information
Authorizer
A FastCGI authorizer receives all the information associated with an HTTP request and generates an authorized/unauthorized decision. In case of an authorized decision the authorizer can also associate name-value pairs with the HTTP request. A responder receives the following information from the web-server:
- Environment variables and request parameters (see
get_param
/get_str_param
)
An authorizer has the following communication channels at its disposal:
- Result code (see
RequestResult
) - StdOut (see
get_stdout
) - StdErr (see
get_stderr
)
see the FastCGI specification for more Information
Filter
A FastCGI filter receives all the information associated with an HTTP request, plus an extra stream of data from a file stored on the Web server, and generates a “filtered” version of the data stream as an HTTP response. A filter receives the following information from the web-server:
- Environment variables, request parameters and additional information
(
FCGI_DATA_LAST_MOD
andFCGI_DATA_LENGTH
) (seeget_param
/get_str_param
) - StdIn (see
get_stdin
) - File Data from the web-server (see
get_data
)
A filter has the following communication channels at its disposal:
- Result code (see
RequestResult
) - StdOut (see
get_stdout
) - StdErr (see
get_stderr
)
see the FastCGI specification for more Information