Apache HTTPD
Classes | Macros | Enumerations | Functions | Variables
mod_proxy_fcgi.c File Reference
#include "mod_proxy.h"
#include "util_fcgi.h"
#include "util_script.h"
#include "ap_expr.h"

Go to the source code of this file.

Classes

struct  sei_entry
 
struct  fcgi_req_config_t
 
struct  fcgi_dirconf_t
 

Macros

#define FCGI_MAY_BE_FPM(dconf)
 
#define FCGI_SCHEME   "FCGI"
 
#define MAX_MEM_SPOOL   16384
 

Enumerations

enum  fcgi_backend_t { BACKEND_DEFAULT_UNKNOWN = 0 , BACKEND_FPM , BACKEND_GENERIC }
 
enum  {
  HDR_STATE_READING_HEADERS , HDR_STATE_GOT_CR , HDR_STATE_GOT_CRLF , HDR_STATE_GOT_CRLFCR ,
  HDR_STATE_GOT_LF , HDR_STATE_DONE_WITH_HEADERS
}
 

Functions

static int proxy_fcgi_canon (request_rec *r, char *url)
 
static apr_status_t fix_cgivars (request_rec *r, fcgi_dirconf_t *dconf)
 
static apr_status_t send_data (proxy_conn_rec *conn, struct iovec *vec, int nvec, apr_size_t *len)
 
static apr_status_t get_data (proxy_conn_rec *conn, char *buffer, apr_size_t *buflen)
 
static apr_status_t get_data_full (proxy_conn_rec *conn, char *buffer, apr_size_t buflen)
 
static apr_status_t send_begin_request (proxy_conn_rec *conn, apr_uint16_t request_id)
 
static apr_status_t send_environment (proxy_conn_rec *conn, request_rec *r, apr_pool_t *temp_pool, apr_uint16_t request_id)
 
static int handle_headers (request_rec *r, int *state, const char *readbuf, apr_size_t readlen)
 
static apr_status_t dispatch (proxy_conn_rec *conn, proxy_dir_conf *conf, request_rec *r, apr_pool_t *setaside_pool, apr_uint16_t request_id, const char **err, int *bad_request, int *has_responded, apr_bucket_brigade *input_brigade)
 
static int fcgi_do_request (apr_pool_t *p, request_rec *r, proxy_conn_rec *conn, conn_rec *origin, proxy_dir_conf *conf, apr_uri_t *uri, char *url, char *server_portstr, apr_bucket_brigade *input_brigade)
 
static int proxy_fcgi_handler (request_rec *r, proxy_worker *worker, proxy_server_conf *conf, char *url, const char *proxyname, apr_port_t proxyport)
 
static void * fcgi_create_dconf (apr_pool_t *p, char *path)
 
static void * fcgi_merge_dconf (apr_pool_t *p, void *basev, void *overridesv)
 
static const charcmd_servertype (cmd_parms *cmd, void *in_dconf, const char *val)
 
static const charcmd_setenv (cmd_parms *cmd, void *in_dconf, const char *arg1, const char *arg2, const char *arg3)
 
static void register_hooks (apr_pool_t *p)
 

Variables

static const command_rec command_table []
 
static int *const aplog_module_index = &( proxy_fcgi_module.module_index)
 

Macro Definition Documentation

◆ FCGI_MAY_BE_FPM

#define FCGI_MAY_BE_FPM (   dconf)
Value:
(dconf && \
((dconf->backend_type == BACKEND_DEFAULT_UNKNOWN) || \
(dconf->backend_type == BACKEND_FPM)))
@ BACKEND_DEFAULT_UNKNOWN
@ BACKEND_FPM

Definition at line 42 of file mod_proxy_fcgi.c.

◆ FCGI_SCHEME

#define FCGI_SCHEME   "FCGI"

Definition at line 1052 of file mod_proxy_fcgi.c.

◆ MAX_MEM_SPOOL

#define MAX_MEM_SPOOL   16384

Definition at line 1054 of file mod_proxy_fcgi.c.

Enumeration Type Documentation

◆ anonymous enum

Enumerator
HDR_STATE_READING_HEADERS 
HDR_STATE_GOT_CR 
HDR_STATE_GOT_CRLF 
HDR_STATE_GOT_CRLFCR 
HDR_STATE_GOT_LF 
HDR_STATE_DONE_WITH_HEADERS 

Definition at line 479 of file mod_proxy_fcgi.c.

◆ fcgi_backend_t

Enumerator
BACKEND_DEFAULT_UNKNOWN 
BACKEND_FPM 
BACKEND_GENERIC 

Definition at line 35 of file mod_proxy_fcgi.c.

Function Documentation

◆ cmd_servertype()

static const char * cmd_servertype ( cmd_parms cmd,
void *  in_dconf,
const char val 
)
static

Definition at line 1264 of file mod_proxy_fcgi.c.

◆ cmd_setenv()

static const char * cmd_setenv ( cmd_parms cmd,
void *  in_dconf,
const char arg1,
const char arg2,
const char arg3 
)
static

Definition at line 1284 of file mod_proxy_fcgi.c.

◆ dispatch()

static apr_status_t dispatch ( proxy_conn_rec conn,
proxy_dir_conf conf,
request_rec r,
apr_pool_t setaside_pool,
apr_uint16_t  request_id,
const char **  err,
int bad_request,
int has_responded,
apr_bucket_brigade input_brigade 
)
static

< Can read without blocking

< Can write without blocking

< Can read without blocking

< Can write without blocking

< Can read without blocking

< Can read without blocking

< Module has handled this stage.

Definition at line 547 of file mod_proxy_fcgi.c.

◆ fcgi_create_dconf()

static void * fcgi_create_dconf ( apr_pool_t p,
char path 
)
static

Definition at line 1238 of file mod_proxy_fcgi.c.

◆ fcgi_do_request()

static int fcgi_do_request ( apr_pool_t p,
request_rec r,
proxy_conn_rec conn,
conn_rec origin,
proxy_dir_conf conf,
apr_uri_t uri,
char url,
char server_portstr,
apr_bucket_brigade input_brigade 
)
static

< Module has handled this stage.

< Module has handled this stage.

Definition at line 974 of file mod_proxy_fcgi.c.

◆ fcgi_merge_dconf()

static void * fcgi_merge_dconf ( apr_pool_t p,
void *  basev,
void *  overridesv 
)
static

Definition at line 1249 of file mod_proxy_fcgi.c.

◆ fix_cgivars()

static apr_status_t fix_cgivars ( request_rec r,
fcgi_dirconf_t dconf 
)
static

Definition at line 182 of file mod_proxy_fcgi.c.

◆ get_data()

static apr_status_t get_data ( proxy_conn_rec conn,
char buffer,
apr_size_t buflen 
)
static

Definition at line 274 of file mod_proxy_fcgi.c.

◆ get_data_full()

static apr_status_t get_data_full ( proxy_conn_rec conn,
char buffer,
apr_size_t  buflen 
)
static

Definition at line 287 of file mod_proxy_fcgi.c.

◆ handle_headers()

static int handle_headers ( request_rec r,
int state,
const char readbuf,
apr_size_t  readlen 
)
static

Definition at line 494 of file mod_proxy_fcgi.c.

◆ proxy_fcgi_canon()

static int proxy_fcgi_canon ( request_rec r,
char url 
)
static

< Module declines to handle

< Module has handled this stage.

Definition at line 58 of file mod_proxy_fcgi.c.

◆ proxy_fcgi_handler()

static int proxy_fcgi_handler ( request_rec r,
proxy_worker worker,
proxy_server_conf conf,
char url,
const char proxyname,
apr_port_t  proxyport 
)
static

< Module declines to handle

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

Definition at line 1059 of file mod_proxy_fcgi.c.

◆ register_hooks()

static void register_hooks ( apr_pool_t p)
static

Definition at line 1332 of file mod_proxy_fcgi.c.

◆ send_begin_request()

static apr_status_t send_begin_request ( proxy_conn_rec conn,
apr_uint16_t  request_id 
)
static

Definition at line 307 of file mod_proxy_fcgi.c.

◆ send_data()

static apr_status_t send_data ( proxy_conn_rec conn,
struct iovec vec,
int  nvec,
apr_size_t len 
)
static

Definition at line 229 of file mod_proxy_fcgi.c.

◆ send_environment()

static apr_status_t send_environment ( proxy_conn_rec conn,
request_rec r,
apr_pool_t temp_pool,
apr_uint16_t  request_id 
)
static

Definition at line 335 of file mod_proxy_fcgi.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( proxy_fcgi_module.module_index)
static

Definition at line 1346 of file mod_proxy_fcgi.c.

◆ command_table

const command_rec command_table[]
static
Initial value:
= {
{ "ProxyFCGIBackendType" , cmd_servertype , NULL , 4 , TAKE1, "Specify the type of FastCGI server: 'Generic', 'FPM'" },
{ "ProxyFCGISetEnvIf" , cmd_setenv , NULL , 4 , TAKE23, "expr-condition env-name expr-value" },
{ NULL }
}
@ TAKE1
Definition http_config.h:51
@ TAKE23
Definition http_config.h:63
static const char * cmd_servertype(cmd_parms *cmd, void *in_dconf, const char *val)
static const char * cmd_setenv(cmd_parms *cmd, void *in_dconf, const char *arg1, const char *arg2, const char *arg3)
return NULL
Definition mod_so.c:359

Definition at line 1338 of file mod_proxy_fcgi.c.