|
Apache HTTPD
|
Classes | |
| struct | ap_fcgi_header |
| A structure that represents the fixed header fields at the beginning of a "FastCGI record" (i.e., the data prior to content data and padding). More... | |
| struct | ap_fcgi_begin_request_body |
| This represents the content data of the FastCGI record when the type is AP_FCGI_BEGIN_REQUEST. More... | |
Functions | |
| void | ap_fcgi_header_to_array (ap_fcgi_header *h, unsigned char a[]) |
| void | ap_fcgi_header_from_array (ap_fcgi_header *h, unsigned char a[]) |
| void | ap_fcgi_header_fields_from_array (unsigned char *version, unsigned char *type, apr_uint16_t *request_id, apr_uint16_t *content_len, unsigned char *padding_len, unsigned char a[]) |
| void | ap_fcgi_begin_request_body_to_array (ap_fcgi_begin_request_body *h, unsigned char a[]) |
| void | ap_fcgi_fill_in_header (ap_fcgi_header *header, unsigned char type, apr_uint16_t request_id, apr_uint16_t content_len, unsigned char padding_len) |
| void | ap_fcgi_fill_in_request_body (ap_fcgi_begin_request_body *brb, int role, unsigned char flags) |
| apr_size_t | ap_fcgi_encoded_env_len (apr_table_t *env, apr_size_t maxlen, int *starting_elem) |
| apr_status_t | ap_fcgi_encode_env (request_rec *r, apr_table_t *env, void *buffer, apr_size_t buflen, int *starting_elem) |
| #define AP_FCGI_ABORT_REQUEST 2 |
Definition at line 78 of file util_fcgi.h.
| #define AP_FCGI_APACHE_ROLE_ACCESS_CHECKER_STR "ACCESS_CHECKER" |
Definition at line 273 of file util_fcgi.h.
| #define AP_FCGI_APACHE_ROLE_AUTHENTICATOR_STR "AUTHENTICATOR" |
FastCGI implementations that implement the AUTHORIZER role for Apache httpd and allow the application to participate in any of the Apache httpd AAA phases typically set the variable FCGI_APACHE_ROLE to one of these strings to indicate the specific AAA phase.
Definition at line 271 of file util_fcgi.h.
| #define AP_FCGI_APACHE_ROLE_AUTHORIZER_STR "AUTHORIZER" |
Definition at line 272 of file util_fcgi.h.
| #define AP_FCGI_AUTHORIZER 2 |
Definition at line 126 of file util_fcgi.h.
| #define AP_FCGI_AUTHORIZER_STR "AUTHORIZER" |
Definition at line 261 of file util_fcgi.h.
| #define AP_FCGI_BEGIN_REQUEST 1 |
Possible values for the type field of ap_fcgi_header
Definition at line 77 of file util_fcgi.h.
| #define AP_FCGI_BRB_FLAGS_OFFSET 2 |
Definition at line 139 of file util_fcgi.h.
| #define AP_FCGI_BRB_RESERVED0_OFFSET 3 |
Definition at line 140 of file util_fcgi.h.
| #define AP_FCGI_BRB_RESERVED1_OFFSET 4 |
Definition at line 141 of file util_fcgi.h.
| #define AP_FCGI_BRB_RESERVED2_OFFSET 5 |
Definition at line 142 of file util_fcgi.h.
| #define AP_FCGI_BRB_RESERVED3_OFFSET 6 |
Definition at line 143 of file util_fcgi.h.
| #define AP_FCGI_BRB_RESERVED4_OFFSET 7 |
Definition at line 144 of file util_fcgi.h.
| #define AP_FCGI_BRB_ROLEB0_OFFSET 1 |
Definition at line 138 of file util_fcgi.h.
| #define AP_FCGI_BRB_ROLEB1_OFFSET 0 |
Offsets of the various fields of ap_fcgi_begin_request_body
Definition at line 137 of file util_fcgi.h.
| #define AP_FCGI_DATA 8 |
Definition at line 84 of file util_fcgi.h.
| #define AP_FCGI_END_REQUEST 3 |
Definition at line 79 of file util_fcgi.h.
| #define AP_FCGI_FILTER 3 |
Definition at line 127 of file util_fcgi.h.
| #define AP_FCGI_FILTER_STR "FILTER" |
Definition at line 262 of file util_fcgi.h.
| #define AP_FCGI_GET_VALUES 9 |
Definition at line 85 of file util_fcgi.h.
| #define AP_FCGI_GET_VALUES_RESULT 10 |
Definition at line 86 of file util_fcgi.h.
| #define AP_FCGI_HDR_CONTENT_LEN_B0_OFFSET 5 |
Definition at line 98 of file util_fcgi.h.
| #define AP_FCGI_HDR_CONTENT_LEN_B1_OFFSET 4 |
Definition at line 97 of file util_fcgi.h.
| #define AP_FCGI_HDR_PADDING_LEN_OFFSET 6 |
Definition at line 99 of file util_fcgi.h.
| #define AP_FCGI_HDR_REQUEST_ID_B0_OFFSET 3 |
Definition at line 96 of file util_fcgi.h.
| #define AP_FCGI_HDR_REQUEST_ID_B1_OFFSET 2 |
Definition at line 95 of file util_fcgi.h.
| #define AP_FCGI_HDR_RESERVED_OFFSET 7 |
Definition at line 100 of file util_fcgi.h.
| #define AP_FCGI_HDR_TYPE_OFFSET 1 |
Definition at line 94 of file util_fcgi.h.
| #define AP_FCGI_HDR_VERSION_OFFSET 0 |
Offsets of the various fields of ap_fcgi_header
Definition at line 93 of file util_fcgi.h.
| #define AP_FCGI_HEADER_LEN 8 |
Definition at line 62 of file util_fcgi.h.
| #define AP_FCGI_KEEP_CONN 1 /* otherwise the application closes */ |
Definition at line 132 of file util_fcgi.h.
| #define AP_FCGI_MAX_CONTENT_LEN 65535 |
Definition at line 67 of file util_fcgi.h.
| #define AP_FCGI_MAXTYPE (AP_FCGI_UNKNOWN_TYPE) |
Definition at line 88 of file util_fcgi.h.
| #define AP_FCGI_PARAMS 4 |
Definition at line 80 of file util_fcgi.h.
| #define AP_FCGI_RESPONDER 1 |
Definition at line 125 of file util_fcgi.h.
| #define AP_FCGI_RESPONDER_STR "RESPONDER" |
String forms for the value of the FCGI_ROLE envvar
Definition at line 260 of file util_fcgi.h.
| #define AP_FCGI_STDERR 7 |
Definition at line 83 of file util_fcgi.h.
| #define AP_FCGI_STDIN 5 |
Definition at line 81 of file util_fcgi.h.
| #define AP_FCGI_STDOUT 6 |
Definition at line 82 of file util_fcgi.h.
| #define AP_FCGI_UNKNOWN_TYPE 11 |
Definition at line 87 of file util_fcgi.h.
| #define AP_FCGI_VERSION_1 1 |
Possible values for the version field of ap_fcgi_header
Definition at line 72 of file util_fcgi.h.
| void ap_fcgi_begin_request_body_to_array | ( | ap_fcgi_begin_request_body * | h, |
| unsigned char | a[] | ||
| ) |
Pack ap_fcgi_begin_request_body
| h | The begin-request body to read from |
| a | The array to write to, of size AP_FCGI_HEADER_LEN |
Definition at line 68 of file util_fcgi.c.
| apr_status_t ap_fcgi_encode_env | ( | request_rec * | r, |
| apr_table_t * | env, | ||
| void * | buffer, | ||
| apr_size_t | buflen, | ||
| int * | starting_elem | ||
| ) |
Encode the next portion of the provided environment table using a buffer previously allocated.
| r | The request, for logging |
| env | The environment table |
| buffer | A buffer to contain the encoded environment table |
| buflen | The length of the buffer, previously computed by ap_fcgi_encoded_env_len(). |
| starting_elem | On input, the next element of the table array to process in this FastCGI record. On output, the next element to process on the next FastCGI record. |
Definition at line 179 of file util_fcgi.c.
| apr_size_t ap_fcgi_encoded_env_len | ( | apr_table_t * | env, |
| apr_size_t | maxlen, | ||
| int * | starting_elem | ||
| ) |
Compute the buffer size needed to encode the next portion of the provided environment table.
| env | The environment table |
| maxlen | The maximum buffer size allowable, capped at AP_FCGI_MAX_CONTENT_LEN. |
| starting_elem | On input, the next element of the table array to process in this FastCGI record. On output, the next element to process on the next FastCGI record. |
Definition at line 116 of file util_fcgi.c.
| void ap_fcgi_fill_in_header | ( | ap_fcgi_header * | header, |
| unsigned char | type, | ||
| apr_uint16_t | request_id, | ||
| apr_uint16_t | content_len, | ||
| unsigned char | padding_len | ||
| ) |
Fill in a FastCGI request header with the required field values.
| header | The header to fill in |
| type | The type of record |
| request_id | The request id |
| content_len | The amount of content which follows the header |
| padding_len | The amount of padding which follows the content |
The header array must be at least AP_FCGI_HEADER_LEN bytes long.
Definition at line 81 of file util_fcgi.c.
| void ap_fcgi_fill_in_request_body | ( | ap_fcgi_begin_request_body * | brb, |
| int | role, | ||
| unsigned char | flags | ||
| ) |
Fill in a FastCGI begin request body with the required field values.
| brb | The begin-request-body to fill in |
| role | AP_FCGI_RESPONDER or other roles |
| flags | 0 or a combination of flags like AP_FCGI_KEEP_CONN |
Definition at line 102 of file util_fcgi.c.
| void ap_fcgi_header_fields_from_array | ( | unsigned char * | version, |
| unsigned char * | type, | ||
| apr_uint16_t * | request_id, | ||
| apr_uint16_t * | content_len, | ||
| unsigned char * | padding_len, | ||
| unsigned char | a[] | ||
| ) |
Unpack header of FastCGI record into individual fields
| version | The version, on output |
| type | The type, on output |
| request_id | The request id, on output |
| content_len | The content length, on output |
| padding_len | The amount of padding following the content, on output |
| a | The array to read from, of size AP_FCGI_HEADER_LEN |
Definition at line 52 of file util_fcgi.c.
| void ap_fcgi_header_from_array | ( | ap_fcgi_header * | h, |
| unsigned char | a[] | ||
| ) |
Unpack header of FastCGI record into ap_fcgi_header
| h | The header to write to |
| a | The array to read from, of size AP_FCGI_HEADER_LEN |
Definition at line 39 of file util_fcgi.c.
| void ap_fcgi_header_to_array | ( | ap_fcgi_header * | h, |
| unsigned char | a[] | ||
| ) |
Pack ap_fcgi_header
| h | The header to read from |
| a | The array to write to, of size AP_FCGI_HEADER_LEN |
Definition at line 26 of file util_fcgi.c.