Apache HTTPD
Modules | Classes | Macros | Typedefs | Enumerations | Functions | Variables

Modules

 AJP API functions
 
 Private
 

Classes

struct  proxy_hcmethods_t
 
struct  proxy_wstat_t
 
struct  proxy_remote
 
struct  proxy_alias
 
struct  dirconn_entry
 
struct  noproxy_entry
 
struct  proxy_server_conf
 
struct  proxy_dir_conf
 
struct  proxy_req_conf
 
struct  proxy_conn_rec
 
struct  proxy_completion
 
struct  proxy_conn_pool
 
struct  proxy_hashes
 
struct  proxy_worker_shared
 
struct  proxy_worker
 
struct  proxy_balancer_shared
 
struct  proxy_balancer
 
struct  proxy_balancer_method
 
struct  proxy_LINK_section_post_config_t
 
struct  proxy_LINK_scheme_handler_t
 
struct  proxy_LINK_check_trans_t
 
struct  proxy_LINK_canon_handler_t
 
struct  proxy_LINK_create_req_t
 
struct  proxy_LINK_fixups_t
 
struct  proxy_LINK_pre_request_t
 
struct  proxy_LINK_post_request_t
 
struct  proxy_LINK_request_status_t
 
struct  proxy_tunnel_rec
 

Macros

#define APR_WANT_STRFUNC
 
#define PROXY_CANONENC_FORCEDEC   0x01
 
#define PROXY_CANONENC_NOENCODEDSLASHENCODING   0x02
 
#define BALANCER_PREFIX   "balancer://"
 
#define CRLF   "\015\012"
 
#define DEFAULT_MAX_FORWARDS   -1
 
#define PROXYPASS_NOCANON   0x01
 
#define PROXYPASS_INTERPOLATE   0x02
 
#define PROXYPASS_NOQUERY   0x04
 
#define PROXYPASS_MAP_ENCODED   0x08
 
#define PROXYPASS_MAP_SERVLET   0x18 /* + MAP_ENCODED */
 
#define AP_VOLATILIZE_T(T, x)   (*(T volatile *)&(x))
 
#define PROXY_WORKER_INITIALIZED   0x0001
 
#define PROXY_WORKER_IGNORE_ERRORS   0x0002
 
#define PROXY_WORKER_DRAIN   0x0004
 
#define PROXY_WORKER_GENERIC   0x0008
 
#define PROXY_WORKER_IN_SHUTDOWN   0x0010
 
#define PROXY_WORKER_DISABLED   0x0020
 
#define PROXY_WORKER_STOPPED   0x0040
 
#define PROXY_WORKER_IN_ERROR   0x0080
 
#define PROXY_WORKER_HOT_STANDBY   0x0100
 
#define PROXY_WORKER_FREE   0x0200
 
#define PROXY_WORKER_HC_FAIL   0x0400
 
#define PROXY_WORKER_HOT_SPARE   0x0800
 
#define PROXY_WORKER_INITIALIZED_FLAG   'O'
 
#define PROXY_WORKER_IGNORE_ERRORS_FLAG   'I'
 
#define PROXY_WORKER_DRAIN_FLAG   'N'
 
#define PROXY_WORKER_GENERIC_FLAG   'G'
 
#define PROXY_WORKER_IN_SHUTDOWN_FLAG   'U'
 
#define PROXY_WORKER_DISABLED_FLAG   'D'
 
#define PROXY_WORKER_STOPPED_FLAG   'S'
 
#define PROXY_WORKER_IN_ERROR_FLAG   'E'
 
#define PROXY_WORKER_HOT_STANDBY_FLAG   'H'
 
#define PROXY_WORKER_FREE_FLAG   'F'
 
#define PROXY_WORKER_HC_FAIL_FLAG   'C'
 
#define PROXY_WORKER_HOT_SPARE_FLAG   'R'
 
#define PROXY_WORKER_NOT_USABLE_BITMAP
 
#define PROXY_WORKER_IS_INITIALIZED(f)   ( (f)->s->status & PROXY_WORKER_INITIALIZED )
 
#define PROXY_WORKER_IS_STANDBY(f)   ( (f)->s->status & PROXY_WORKER_HOT_STANDBY )
 
#define PROXY_WORKER_IS_SPARE(f)   ( (f)->s->status & PROXY_WORKER_HOT_SPARE )
 
#define PROXY_WORKER_IS_USABLE(f)
 
#define PROXY_WORKER_IS_DRAINING(f)   ( (f)->s->status & PROXY_WORKER_DRAIN )
 
#define PROXY_WORKER_IS_GENERIC(f)   ( (f)->s->status & PROXY_WORKER_GENERIC )
 
#define PROXY_WORKER_IS_HCFAILED(f)   ( (f)->s->status & PROXY_WORKER_HC_FAIL )
 
#define PROXY_WORKER_IS_ERROR(f)   ( (f)->s->status & PROXY_WORKER_IN_ERROR )
 
#define PROXY_WORKER_IS(f, b)   ( (f)->s->status & (b) )
 
#define PROXY_WORKER_DEFAULT_RETRY   60
 
#define PROXY_WORKER_MAX_SCHEME_SIZE   16
 
#define PROXY_WORKER_MAX_ROUTE_SIZE   64
 
#define PROXY_BALANCER_MAX_ROUTE_SIZE   PROXY_WORKER_MAX_ROUTE_SIZE
 
#define PROXY_WORKER_MAX_NAME_SIZE   96
 
#define PROXY_BALANCER_MAX_NAME_SIZE   PROXY_WORKER_MAX_NAME_SIZE
 
#define PROXY_WORKER_MAX_HOSTNAME_SIZE   64
 
#define PROXY_BALANCER_MAX_HOSTNAME_SIZE   PROXY_WORKER_MAX_HOSTNAME_SIZE
 
#define PROXY_BALANCER_MAX_STICKY_SIZE   64
 
#define PROXY_WORKER_MAX_SECRET_SIZE   64
 
#define PROXY_RFC1035_HOSTNAME_SIZE   256
 
#define PROXY_WORKER_EXT_NAME_SIZE   384
 
#define PROXY_WORKER_RFC1035_NAME_SIZE   512
 
#define PROXY_MAX_PROVIDER_NAME_SIZE   16
 
#define PROXY_STRNCPY(dst, src)   ap_proxy_strncpy((dst), (src), (sizeof(dst)))
 
#define PROXY_COPY_CONF_PARAMS(w, c)
 
#define PROXY_SHOULD_PING_100_CONTINUE(w, r)
 
#define PROXY_DO_100_CONTINUE(w, r)
 
#define ALIGNED_PROXY_WORKER_SHARED_SIZE   (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
 
#define HCHECK_WATHCHDOG_DEFAULT_INTERVAL   (30)
 
#define HCHECK_WATHCHDOG_INTERVAL   (2)
 
#define PROXY_FLUSH_WAIT   10000
 
#define ALIGNED_PROXY_BALANCER_SHARED_SIZE   (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared)))
 
#define PROXY_THREAD_LOCK(x)   ( (x) && (x)->tmutex ? apr_thread_mutex_lock((x)->tmutex) : APR_SUCCESS)
 
#define PROXY_THREAD_UNLOCK(x)   ( (x) && (x)->tmutex ? apr_thread_mutex_unlock((x)->tmutex) : APR_SUCCESS)
 
#define PROXY_GLOBAL_LOCK(x)   ( (x) && (x)->gmutex ? apr_global_mutex_lock((x)->gmutex) : APR_SUCCESS)
 
#define PROXY_GLOBAL_UNLOCK(x)   ( (x) && (x)->gmutex ? apr_global_mutex_unlock((x)->gmutex) : APR_SUCCESS)
 
#define PROXY_DECLARE(type)   type
 
#define PROXY_DECLARE_NONSTD(type)   type
 
#define PROXY_DECLARE_DATA
 
#define PROXY_DECLARE_OPTIONAL_HOOK   APR_DECLARE_EXTERNAL_HOOK
 
#define AP_PROXY_WORKER_IS_PREFIX   (1u << 0)
 
#define AP_PROXY_WORKER_IS_MATCH   (1u << 1)
 
#define AP_PROXY_WORKER_IS_MALLOCED   (1u << 2)
 
#define AP_PROXY_WORKER_NO_UDS   (1u << 3)
 
#define PROXY_DETERMINE_ADDRESS_CHECK   (1u << 0)
 
#define PROXY_CHECK_CONN_EMPTY   (1 << 0)
 
#define PROXY_LBMETHOD   "proxylbmethod"
 
#define PROXY_DYNAMIC_BALANCER_LIMIT   16
 
#define AP_PROXY_TRANSFER_FLUSH_EACH   (0x00)
 
#define AP_PROXY_TRANSFER_FLUSH_AFTER   (0x01)
 
#define AP_PROXY_TRANSFER_YIELD_PENDING   (0x02)
 
#define AP_PROXY_TRANSFER_YIELD_MAX_READS   (0x04)
 

Typedefs

typedef struct proxy_balancer proxy_balancer
 
typedef struct proxy_worker proxy_worker
 
typedef struct proxy_conn_pool proxy_conn_pool
 
typedef struct proxy_balancer_method proxy_balancer_method
 
typedef void() apr_OFN_hc_show_exprs_t(request_rec *)
 
typedef void() apr_OFN_hc_select_exprs_t(request_rec *, const char *)
 
typedef int() apr_OFN_hc_valid_expr_t(request_rec *, const char *)
 
typedef const char *() apr_OFN_set_worker_hc_param_t(apr_pool_t *, server_rec *, proxy_worker *, const char *, const char *, void *)
 
typedef int proxy_HOOK_section_post_config_t(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s, ap_conf_vector_t *section_config)
 
typedef struct proxy_LINK_section_post_config_t proxy_LINK_section_post_config_t
 
typedef int proxy_HOOK_scheme_handler_t(request_rec *r, proxy_worker *worker, proxy_server_conf *conf, char *url, const char *proxyhost, apr_port_t proxyport)
 
typedef struct proxy_LINK_scheme_handler_t proxy_LINK_scheme_handler_t
 
typedef int proxy_HOOK_check_trans_t(request_rec *r, const char *url)
 
typedef struct proxy_LINK_check_trans_t proxy_LINK_check_trans_t
 
typedef int proxy_HOOK_canon_handler_t(request_rec *r, char *url)
 
typedef struct proxy_LINK_canon_handler_t proxy_LINK_canon_handler_t
 
typedef int proxy_HOOK_create_req_t(request_rec *r, request_rec *pr)
 
typedef struct proxy_LINK_create_req_t proxy_LINK_create_req_t
 
typedef int proxy_HOOK_fixups_t(request_rec *r)
 
typedef struct proxy_LINK_fixups_t proxy_LINK_fixups_t
 
typedef int proxy_HOOK_pre_request_t(proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url)
 
typedef struct proxy_LINK_pre_request_t proxy_LINK_pre_request_t
 
typedef int proxy_HOOK_post_request_t(proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf)
 
typedef struct proxy_LINK_post_request_t proxy_LINK_post_request_t
 
typedef int proxy_HOOK_request_status_t(int *status, request_rec *r)
 
typedef struct proxy_LINK_request_status_t proxy_LINK_request_status_t
 
typedef const char *(* ap_proxy_header_reverse_map_fn) (request_rec *, proxy_dir_conf *, const char *)
 
typedef int() proxy_is_best_callback_fn_t(proxy_worker *current, proxy_worker *prev_best, void *baton)
 
typedef proxy_worker *() apr_OFN_proxy_balancer_get_best_worker_t(proxy_balancer *balancer, request_rec *r, proxy_is_best_callback_fn_t *is_best, void *baton)
 
typedef int() apr_OFN_ap_proxy_retry_worker_t(const char *proxy_function, proxy_worker *worker, server_rec *s)
 
typedef apr_status_t() apr_OFN_balancer_manage_t(request_rec *, apr_table_t *params)
 
typedef int() apr_OFN_ap_proxy_clear_connection_t(request_rec *r, apr_table_t *headers)
 
typedef apr_status_t() apr_OFN_ajp_handle_cping_cpong_t(apr_socket_t *sock, request_rec *r, apr_interval_time_t timeout)
 

Enumerations

enum  enctype {
  enc_path , enc_search , enc_user , enc_fpath ,
  enc_parm
}
 
enum  hcmethod_t {
  NONE , TCP , OPTIONS , HEAD ,
  GET , CPING , PROVIDER , OPTIONS11 ,
  HEAD11 , GET11 , EOT
}
 
enum  proxy_hash_t { PROXY_HASHFUNC_DEFAULT , PROXY_HASHFUNC_APR , PROXY_HASHFUNC_FNV }
 

Functions

void proxy_hook_section_post_config (proxy_HOOK_section_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_section_post_config (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s, ap_conf_vector_t *section_config)
 
apr_array_header_tproxy_hook_get_section_post_config (void)
 
void proxy_hook_scheme_handler (proxy_HOOK_scheme_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_scheme_handler (request_rec *r, proxy_worker *worker, proxy_server_conf *conf, char *url, const char *proxyhost, apr_port_t proxyport)
 
apr_array_header_tproxy_hook_get_scheme_handler (void)
 
void proxy_hook_check_trans (proxy_HOOK_check_trans_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_check_trans (request_rec *r, const char *url)
 
apr_array_header_tproxy_hook_get_check_trans (void)
 
void proxy_hook_canon_handler (proxy_HOOK_canon_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_canon_handler (request_rec *r, char *url)
 
apr_array_header_tproxy_hook_get_canon_handler (void)
 
void proxy_hook_create_req (proxy_HOOK_create_req_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_create_req (request_rec *r, request_rec *pr)
 
apr_array_header_tproxy_hook_get_create_req (void)
 
void proxy_hook_fixups (proxy_HOOK_fixups_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_fixups (request_rec *r)
 
apr_array_header_tproxy_hook_get_fixups (void)
 
void proxy_hook_pre_request (proxy_HOOK_pre_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_pre_request (proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url)
 
apr_array_header_tproxy_hook_get_pre_request (void)
 
void proxy_hook_post_request (proxy_HOOK_post_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_post_request (proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf)
 
apr_array_header_tproxy_hook_get_post_request (void)
 
void proxy_hook_request_status (proxy_HOOK_request_status_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int proxy_run_request_status (int *status, request_rec *r)
 
apr_array_header_tproxy_hook_get_request_status (void)
 
apr_status_t ap_proxy_strncpy (char *dst, const char *src, apr_size_t dlen)
 
int ap_proxy_hex2c (const char *x)
 
void ap_proxy_c2hex (int ch, char *x)
 
charap_proxy_canonenc_ex (apr_pool_t *p, const char *x, int len, enum enctype t, int flags, int proxyreq)
 
charap_proxy_canonenc (apr_pool_t *p, const char *x, int len, enum enctype t, int forcedec, int proxyreq)
 
charap_proxy_canon_netloc (apr_pool_t *p, char **const urlp, char **userp, char **passwordp, char **hostp, apr_port_t *port)
 
int ap_proxyerror (request_rec *r, int statuscode, const char *message)
 
int ap_proxy_checkproxyblock (request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr)
 
int ap_proxy_checkproxyblock2 (request_rec *r, proxy_server_conf *conf, const char *hostname, apr_sockaddr_t *addr)
 
int ap_proxy_pre_http_request (conn_rec *c, request_rec *r)
 
int ap_proxy_connect_to_backend (apr_socket_t **, const char *, apr_sockaddr_t *, const char *, proxy_server_conf *, request_rec *)
 
apr_status_t ap_proxy_ssl_connection_cleanup (proxy_conn_rec *conn, request_rec *r)
 
int ap_proxy_ssl_enable (conn_rec *c)
 
int ap_proxy_ssl_disable (conn_rec *c)
 
int ap_proxy_ssl_engine (conn_rec *c, ap_conf_vector_t *per_dir_config, int enable)
 
int ap_proxy_conn_is_https (conn_rec *c)
 
const charap_proxy_ssl_val (apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var)
 
const charap_proxy_location_reverse_map (request_rec *r, proxy_dir_conf *conf, const char *url)
 
const charap_proxy_cookie_reverse_map (request_rec *r, proxy_dir_conf *conf, const char *str)
 
charap_proxy_worker_name (apr_pool_t *p, proxy_worker *worker)
 
int ap_proxy_worker_can_upgrade (apr_pool_t *p, const proxy_worker *worker, const char *upgrade, const char *dflt)
 
proxy_workerap_proxy_get_worker_ex (apr_pool_t *p, proxy_balancer *balancer, proxy_server_conf *conf, const char *url, unsigned int mask)
 
proxy_workerap_proxy_get_worker (apr_pool_t *p, proxy_balancer *balancer, proxy_server_conf *conf, const char *url)
 
charap_proxy_define_worker_ex (apr_pool_t *p, proxy_worker **worker, proxy_balancer *balancer, proxy_server_conf *conf, const char *url, unsigned int mask)
 
charap_proxy_define_worker (apr_pool_t *p, proxy_worker **worker, proxy_balancer *balancer, proxy_server_conf *conf, const char *url, int do_malloc)
 
charap_proxy_define_match_worker (apr_pool_t *p, proxy_worker **worker, proxy_balancer *balancer, proxy_server_conf *conf, const char *url, int do_malloc)
 
apr_status_t ap_proxy_share_worker (proxy_worker *worker, proxy_worker_shared *shm, int i)
 
apr_status_t ap_proxy_initialize_worker (proxy_worker *worker, server_rec *s, apr_pool_t *p)
 
int ap_proxy_valid_balancer_name (char *name, int i)
 
proxy_balancerap_proxy_get_balancer (apr_pool_t *p, proxy_server_conf *conf, const char *url, int careactive)
 
charap_proxy_update_balancer (apr_pool_t *p, proxy_balancer *balancer, const char *url)
 
charap_proxy_define_balancer (apr_pool_t *p, proxy_balancer **balancer, proxy_server_conf *conf, const char *url, const char *alias, int do_malloc)
 
apr_status_t ap_proxy_share_balancer (proxy_balancer *balancer, proxy_balancer_shared *shm, int i)
 
apr_status_t ap_proxy_initialize_balancer (proxy_balancer *balancer, server_rec *s, apr_pool_t *p)
 
proxy_workerap_proxy_balancer_get_best_worker (proxy_balancer *balancer, request_rec *r, proxy_is_best_callback_fn_t *is_best, void *baton)
 
proxy_worker_sharedap_proxy_find_workershm (ap_slotmem_provider_t *storage, ap_slotmem_instance_t *slot, proxy_worker *worker, unsigned int *index)
 
proxy_balancer_sharedap_proxy_find_balancershm (ap_slotmem_provider_t *storage, ap_slotmem_instance_t *slot, proxy_balancer *balancer, unsigned int *index)
 
int ap_proxy_fixup_uds_filename (request_rec *r)
 
int ap_proxy_pre_request (proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url)
 
int ap_proxy_post_request (proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf)
 
apr_status_t ap_proxy_determine_address (const char *proxy_function, proxy_conn_rec *conn, const char *hostname, apr_port_t hostport, unsigned int flags, request_rec *r, server_rec *s)
 
int ap_proxy_determine_connection (apr_pool_t *p, request_rec *r, proxy_server_conf *conf, proxy_worker *worker, proxy_conn_rec *conn, apr_uri_t *uri, char **url, const char *proxyname, apr_port_t proxyport, char *server_portstr, int server_portstr_size)
 
int ap_proxy_acquire_connection (const char *proxy_function, proxy_conn_rec **conn, proxy_worker *worker, server_rec *s)
 
int ap_proxy_release_connection (const char *proxy_function, proxy_conn_rec *conn, server_rec *s)
 
apr_status_t ap_proxy_check_connection (const char *scheme, proxy_conn_rec *conn, server_rec *server, unsigned max_blank_lines, int flags)
 
int ap_proxy_connect_backend (const char *proxy_function, proxy_conn_rec *conn, proxy_worker *worker, server_rec *s)
 
apr_status_t ap_proxy_connect_uds (apr_socket_t *sock, const char *uds_path, apr_pool_t *p)
 
int ap_proxy_connection_create (const char *proxy_function, proxy_conn_rec *conn, conn_rec *c, server_rec *s)
 
int ap_proxy_connection_create_ex (const char *proxy_function, proxy_conn_rec *conn, request_rec *r)
 
int ap_proxy_connection_reusable (proxy_conn_rec *conn)
 
void ap_proxy_backend_broke (request_rec *r, apr_bucket_brigade *brigade)
 
unsigned int ap_proxy_hashfunc (const char *str, proxy_hash_t method)
 
apr_status_t ap_proxy_set_wstatus (char c, int set, proxy_worker *w)
 
charap_proxy_parse_wstatus (apr_pool_t *p, proxy_worker *w)
 
apr_status_t ap_proxy_sync_balancer (proxy_balancer *b, server_rec *s, proxy_server_conf *conf)
 
int ap_proxy_trans_match (request_rec *r, struct proxy_alias *ent, proxy_dir_conf *dconf)
 
int ap_proxy_create_hdrbrgd (apr_pool_t *p, apr_bucket_brigade *header_brigade, request_rec *r, proxy_conn_rec *p_conn, proxy_worker *worker, proxy_server_conf *conf, apr_uri_t *uri, char *url, char *server_portstr, char **old_cl_val, char **old_te_val)
 
int ap_proxy_prefetch_input (request_rec *r, proxy_conn_rec *backend, apr_bucket_brigade *input_brigade, apr_read_type_e block, apr_off_t *bytes_read, apr_off_t max_read)
 
int ap_proxy_spool_input (request_rec *r, proxy_conn_rec *backend, apr_bucket_brigade *input_brigade, apr_off_t *bytes_spooled, apr_off_t max_mem_spool)
 
int ap_proxy_read_input (request_rec *r, proxy_conn_rec *backend, apr_bucket_brigade *input_brigade, apr_off_t max_read)
 
int ap_proxy_pass_brigade (apr_bucket_alloc_t *bucket_alloc, request_rec *r, proxy_conn_rec *p_conn, conn_rec *origin, apr_bucket_brigade *bb, int flush)
 
apr_status_t ap_proxy_tunnel_create (proxy_tunnel_rec **tunnel, request_rec *r, conn_rec *c_o, const char *scheme)
 
int ap_proxy_tunnel_run (proxy_tunnel_rec *tunnel)
 
int ap_proxy_is_socket_connected (apr_socket_t *socket)
 
int ap_proxy_lb_workers (void)
 
int ap_proxy_should_override (proxy_dir_conf *conf, int code)
 
apr_port_t ap_proxy_port_of_scheme (const char *scheme)
 
const charap_proxy_show_hcmethod (hcmethod_t method)
 
const charap_proxy_de_socketfy (apr_pool_t *p, const char *url)
 
apr_status_t ap_proxy_buckets_lifetime_transform (request_rec *r, apr_bucket_brigade *from, apr_bucket_brigade *to)
 
apr_status_t ap_proxy_transfer_between_connections (request_rec *r, conn_rec *c_i, conn_rec *c_o, apr_bucket_brigade *bb_i, apr_bucket_brigade *bb_o, const char *name, int *sent, apr_off_t bsize, int flags)
 

Variables

proxy_hcmethods_t proxy_hcmethods []
 
proxy_wstat_t proxy_wstat_tbl []
 

Detailed Description

Macro Definition Documentation

◆ ALIGNED_PROXY_BALANCER_SHARED_SIZE

#define ALIGNED_PROXY_BALANCER_SHARED_SIZE   (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared)))

Definition at line 556 of file mod_proxy.h.

◆ ALIGNED_PROXY_WORKER_SHARED_SIZE

#define ALIGNED_PROXY_WORKER_SHARED_SIZE   (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))

Definition at line 498 of file mod_proxy.h.

◆ AP_PROXY_TRANSFER_FLUSH_AFTER

#define AP_PROXY_TRANSFER_FLUSH_AFTER   (0x01)

Definition at line 1516 of file mod_proxy.h.

◆ AP_PROXY_TRANSFER_FLUSH_EACH

#define AP_PROXY_TRANSFER_FLUSH_EACH   (0x00)

Definition at line 1515 of file mod_proxy.h.

◆ AP_PROXY_TRANSFER_YIELD_MAX_READS

#define AP_PROXY_TRANSFER_YIELD_MAX_READS   (0x04)

Definition at line 1518 of file mod_proxy.h.

◆ AP_PROXY_TRANSFER_YIELD_PENDING

#define AP_PROXY_TRANSFER_YIELD_PENDING   (0x02)

Definition at line 1517 of file mod_proxy.h.

◆ AP_PROXY_WORKER_IS_MALLOCED

#define AP_PROXY_WORKER_IS_MALLOCED   (1u << 2)

Definition at line 775 of file mod_proxy.h.

◆ AP_PROXY_WORKER_IS_MATCH

#define AP_PROXY_WORKER_IS_MATCH   (1u << 1)

Definition at line 774 of file mod_proxy.h.

◆ AP_PROXY_WORKER_IS_PREFIX

#define AP_PROXY_WORKER_IS_PREFIX   (1u << 0)

Definition at line 773 of file mod_proxy.h.

◆ AP_PROXY_WORKER_NO_UDS

#define AP_PROXY_WORKER_NO_UDS   (1u << 3)

Definition at line 776 of file mod_proxy.h.

◆ AP_VOLATILIZE_T

#define AP_VOLATILIZE_T (   T,
 
)    (*(T volatile *)&(x))

Definition at line 313 of file mod_proxy.h.

◆ APR_WANT_STRFUNC

#define APR_WANT_STRFUNC

Definition at line 44 of file mod_proxy.h.

◆ BALANCER_PREFIX

#define BALANCER_PREFIX   "balancer://"

Definition at line 99 of file mod_proxy.h.

◆ CRLF

#define CRLF   "\015\012"

Definition at line 104 of file mod_proxy.h.

◆ DEFAULT_MAX_FORWARDS

#define DEFAULT_MAX_FORWARDS   -1

Definition at line 111 of file mod_proxy.h.

◆ HCHECK_WATHCHDOG_DEFAULT_INTERVAL

#define HCHECK_WATHCHDOG_DEFAULT_INTERVAL   (30)

Definition at line 516 of file mod_proxy.h.

◆ HCHECK_WATHCHDOG_INTERVAL

#define HCHECK_WATHCHDOG_INTERVAL   (2)

Definition at line 518 of file mod_proxy.h.

◆ PROXY_BALANCER_MAX_HOSTNAME_SIZE

#define PROXY_BALANCER_MAX_HOSTNAME_SIZE   PROXY_WORKER_MAX_HOSTNAME_SIZE

Definition at line 381 of file mod_proxy.h.

◆ PROXY_BALANCER_MAX_NAME_SIZE

#define PROXY_BALANCER_MAX_NAME_SIZE   PROXY_WORKER_MAX_NAME_SIZE

Definition at line 379 of file mod_proxy.h.

◆ PROXY_BALANCER_MAX_ROUTE_SIZE

#define PROXY_BALANCER_MAX_ROUTE_SIZE   PROXY_WORKER_MAX_ROUTE_SIZE

Definition at line 377 of file mod_proxy.h.

◆ PROXY_BALANCER_MAX_STICKY_SIZE

#define PROXY_BALANCER_MAX_STICKY_SIZE   64

Definition at line 382 of file mod_proxy.h.

◆ PROXY_CANONENC_FORCEDEC

#define PROXY_CANONENC_FORCEDEC   0x01

Definition at line 80 of file mod_proxy.h.

◆ PROXY_CANONENC_NOENCODEDSLASHENCODING

#define PROXY_CANONENC_NOENCODEDSLASHENCODING   0x02

Definition at line 81 of file mod_proxy.h.

◆ PROXY_CHECK_CONN_EMPTY

#define PROXY_CHECK_CONN_EMPTY   (1 << 0)

Definition at line 1135 of file mod_proxy.h.

◆ PROXY_COPY_CONF_PARAMS

#define PROXY_COPY_CONF_PARAMS (   w,
  c 
)
Value:
do { \
(w)->s->timeout = (c)->timeout; \
(w)->s->timeout_set = (c)->timeout_set; \
(w)->s->recv_buffer_size = (c)->recv_buffer_size; \
(w)->s->recv_buffer_size_set = (c)->recv_buffer_size_set; \
(w)->s->io_buffer_size = (c)->io_buffer_size; \
(w)->s->io_buffer_size_set = (c)->io_buffer_size_set; \
} while (0)
apr_vformatter_buff_t * c
Definition apr_lib.h:175
const char * s
Definition apr_strings.h:95

Definition at line 397 of file mod_proxy.h.

◆ PROXY_DECLARE

#define PROXY_DECLARE (   type)    type

Definition at line 604 of file mod_proxy.h.

◆ PROXY_DECLARE_DATA

#define PROXY_DECLARE_DATA

Definition at line 606 of file mod_proxy.h.

◆ PROXY_DECLARE_NONSTD

#define PROXY_DECLARE_NONSTD (   type)    type

Definition at line 605 of file mod_proxy.h.

◆ PROXY_DECLARE_OPTIONAL_HOOK

#define PROXY_DECLARE_OPTIONAL_HOOK   APR_DECLARE_EXTERNAL_HOOK

Definition at line 627 of file mod_proxy.h.

◆ PROXY_DETERMINE_ADDRESS_CHECK

#define PROXY_DETERMINE_ADDRESS_CHECK   (1u << 0)

Definition at line 1047 of file mod_proxy.h.

◆ PROXY_DO_100_CONTINUE

#define PROXY_DO_100_CONTINUE (   w,
  r 
)
Value:
&& !apr_table_get((r)->subprocess_env, "force-proxy-request-1.0"))
request_rec * r
#define PROXY_SHOULD_PING_100_CONTINUE(w, r)
Definition mod_proxy.h:407
apr_size_t size

Definition at line 412 of file mod_proxy.h.

◆ PROXY_DYNAMIC_BALANCER_LIMIT

#define PROXY_DYNAMIC_BALANCER_LIMIT   16

Definition at line 1449 of file mod_proxy.h.

◆ PROXY_FLUSH_WAIT

#define PROXY_FLUSH_WAIT   10000

Definition at line 524 of file mod_proxy.h.

◆ PROXY_GLOBAL_LOCK

#define PROXY_GLOBAL_LOCK (   x)    ( (x) && (x)->gmutex ? apr_global_mutex_lock((x)->gmutex) : APR_SUCCESS)

Definition at line 595 of file mod_proxy.h.

◆ PROXY_GLOBAL_UNLOCK

#define PROXY_GLOBAL_UNLOCK (   x)    ( (x) && (x)->gmutex ? apr_global_mutex_unlock((x)->gmutex) : APR_SUCCESS)

Definition at line 596 of file mod_proxy.h.

◆ PROXY_LBMETHOD

#define PROXY_LBMETHOD   "proxylbmethod"

Definition at line 1444 of file mod_proxy.h.

◆ PROXY_MAX_PROVIDER_NAME_SIZE

#define PROXY_MAX_PROVIDER_NAME_SIZE   16

Definition at line 393 of file mod_proxy.h.

◆ PROXY_RFC1035_HOSTNAME_SIZE

#define PROXY_RFC1035_HOSTNAME_SIZE   256

Definition at line 385 of file mod_proxy.h.

◆ PROXY_SHOULD_PING_100_CONTINUE

#define PROXY_SHOULD_PING_100_CONTINUE (   w,
  r 
)
Value:
((w)->s->ping_timeout_set \
&& (PROXYREQ_REVERSE == (r)->proxyreq) \
int ap_request_has_body(request_rec *r)
Definition util.c:2698
#define PROXYREQ_REVERSE
Definition httpd.h:1135

Definition at line 407 of file mod_proxy.h.

◆ PROXY_STRNCPY

#define PROXY_STRNCPY (   dst,
  src 
)    ap_proxy_strncpy((dst), (src), (sizeof(dst)))

Definition at line 395 of file mod_proxy.h.

◆ PROXY_THREAD_LOCK

#define PROXY_THREAD_LOCK (   x)    ( (x) && (x)->tmutex ? apr_thread_mutex_lock((x)->tmutex) : APR_SUCCESS)

Definition at line 592 of file mod_proxy.h.

◆ PROXY_THREAD_UNLOCK

#define PROXY_THREAD_UNLOCK (   x)    ( (x) && (x)->tmutex ? apr_thread_mutex_unlock((x)->tmutex) : APR_SUCCESS)

Definition at line 593 of file mod_proxy.h.

◆ PROXY_WORKER_DEFAULT_RETRY

#define PROXY_WORKER_DEFAULT_RETRY   60

Definition at line 372 of file mod_proxy.h.

◆ PROXY_WORKER_DISABLED

#define PROXY_WORKER_DISABLED   0x0020

Definition at line 325 of file mod_proxy.h.

◆ PROXY_WORKER_DISABLED_FLAG

#define PROXY_WORKER_DISABLED_FLAG   'D'

Definition at line 339 of file mod_proxy.h.

◆ PROXY_WORKER_DRAIN

#define PROXY_WORKER_DRAIN   0x0004

Definition at line 322 of file mod_proxy.h.

◆ PROXY_WORKER_DRAIN_FLAG

#define PROXY_WORKER_DRAIN_FLAG   'N'

Definition at line 336 of file mod_proxy.h.

◆ PROXY_WORKER_EXT_NAME_SIZE

#define PROXY_WORKER_EXT_NAME_SIZE   384

Definition at line 386 of file mod_proxy.h.

◆ PROXY_WORKER_FREE

#define PROXY_WORKER_FREE   0x0200

Definition at line 329 of file mod_proxy.h.

◆ PROXY_WORKER_FREE_FLAG

#define PROXY_WORKER_FREE_FLAG   'F'

Definition at line 343 of file mod_proxy.h.

◆ PROXY_WORKER_GENERIC

#define PROXY_WORKER_GENERIC   0x0008

Definition at line 323 of file mod_proxy.h.

◆ PROXY_WORKER_GENERIC_FLAG

#define PROXY_WORKER_GENERIC_FLAG   'G'

Definition at line 337 of file mod_proxy.h.

◆ PROXY_WORKER_HC_FAIL

#define PROXY_WORKER_HC_FAIL   0x0400

Definition at line 330 of file mod_proxy.h.

◆ PROXY_WORKER_HC_FAIL_FLAG

#define PROXY_WORKER_HC_FAIL_FLAG   'C'

Definition at line 344 of file mod_proxy.h.

◆ PROXY_WORKER_HOT_SPARE

#define PROXY_WORKER_HOT_SPARE   0x0800

Definition at line 331 of file mod_proxy.h.

◆ PROXY_WORKER_HOT_SPARE_FLAG

#define PROXY_WORKER_HOT_SPARE_FLAG   'R'

Definition at line 345 of file mod_proxy.h.

◆ PROXY_WORKER_HOT_STANDBY

#define PROXY_WORKER_HOT_STANDBY   0x0100

Definition at line 328 of file mod_proxy.h.

◆ PROXY_WORKER_HOT_STANDBY_FLAG

#define PROXY_WORKER_HOT_STANDBY_FLAG   'H'

Definition at line 342 of file mod_proxy.h.

◆ PROXY_WORKER_IGNORE_ERRORS

#define PROXY_WORKER_IGNORE_ERRORS   0x0002

Definition at line 321 of file mod_proxy.h.

◆ PROXY_WORKER_IGNORE_ERRORS_FLAG

#define PROXY_WORKER_IGNORE_ERRORS_FLAG   'I'

Definition at line 335 of file mod_proxy.h.

◆ PROXY_WORKER_IN_ERROR

#define PROXY_WORKER_IN_ERROR   0x0080

Definition at line 327 of file mod_proxy.h.

◆ PROXY_WORKER_IN_ERROR_FLAG

#define PROXY_WORKER_IN_ERROR_FLAG   'E'

Definition at line 341 of file mod_proxy.h.

◆ PROXY_WORKER_IN_SHUTDOWN

#define PROXY_WORKER_IN_SHUTDOWN   0x0010

Definition at line 324 of file mod_proxy.h.

◆ PROXY_WORKER_IN_SHUTDOWN_FLAG

#define PROXY_WORKER_IN_SHUTDOWN_FLAG   'U'

Definition at line 338 of file mod_proxy.h.

◆ PROXY_WORKER_INITIALIZED

#define PROXY_WORKER_INITIALIZED   0x0001

Definition at line 320 of file mod_proxy.h.

◆ PROXY_WORKER_INITIALIZED_FLAG

#define PROXY_WORKER_INITIALIZED_FLAG   'O'

Definition at line 334 of file mod_proxy.h.

◆ PROXY_WORKER_IS

#define PROXY_WORKER_IS (   f,
  b 
)    ( (f)->s->status & (b) )

Definition at line 369 of file mod_proxy.h.

◆ PROXY_WORKER_IS_DRAINING

#define PROXY_WORKER_IS_DRAINING (   f)    ( (f)->s->status & PROXY_WORKER_DRAIN )

Definition at line 361 of file mod_proxy.h.

◆ PROXY_WORKER_IS_ERROR

#define PROXY_WORKER_IS_ERROR (   f)    ( (f)->s->status & PROXY_WORKER_IN_ERROR )

Definition at line 367 of file mod_proxy.h.

◆ PROXY_WORKER_IS_GENERIC

#define PROXY_WORKER_IS_GENERIC (   f)    ( (f)->s->status & PROXY_WORKER_GENERIC )

Definition at line 363 of file mod_proxy.h.

◆ PROXY_WORKER_IS_HCFAILED

#define PROXY_WORKER_IS_HCFAILED (   f)    ( (f)->s->status & PROXY_WORKER_HC_FAIL )

Definition at line 365 of file mod_proxy.h.

◆ PROXY_WORKER_IS_INITIALIZED

#define PROXY_WORKER_IS_INITIALIZED (   f)    ( (f)->s->status & PROXY_WORKER_INITIALIZED )

Definition at line 352 of file mod_proxy.h.

◆ PROXY_WORKER_IS_SPARE

#define PROXY_WORKER_IS_SPARE (   f)    ( (f)->s->status & PROXY_WORKER_HOT_SPARE )

Definition at line 356 of file mod_proxy.h.

◆ PROXY_WORKER_IS_STANDBY

#define PROXY_WORKER_IS_STANDBY (   f)    ( (f)->s->status & PROXY_WORKER_HOT_STANDBY )

Definition at line 354 of file mod_proxy.h.

◆ PROXY_WORKER_IS_USABLE

#define PROXY_WORKER_IS_USABLE (   f)
Value:
( ( !( (f)->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) ) && \
apr_file_t * f
#define PROXY_WORKER_IS_INITIALIZED(f)
Definition mod_proxy.h:352
#define PROXY_WORKER_NOT_USABLE_BITMAP
Definition mod_proxy.h:347

Definition at line 358 of file mod_proxy.h.

◆ PROXY_WORKER_MAX_HOSTNAME_SIZE

#define PROXY_WORKER_MAX_HOSTNAME_SIZE   64

Definition at line 380 of file mod_proxy.h.

◆ PROXY_WORKER_MAX_NAME_SIZE

#define PROXY_WORKER_MAX_NAME_SIZE   96

Definition at line 378 of file mod_proxy.h.

◆ PROXY_WORKER_MAX_ROUTE_SIZE

#define PROXY_WORKER_MAX_ROUTE_SIZE   64

Definition at line 376 of file mod_proxy.h.

◆ PROXY_WORKER_MAX_SCHEME_SIZE

#define PROXY_WORKER_MAX_SCHEME_SIZE   16

Definition at line 375 of file mod_proxy.h.

◆ PROXY_WORKER_MAX_SECRET_SIZE

#define PROXY_WORKER_MAX_SECRET_SIZE   64

Definition at line 383 of file mod_proxy.h.

◆ PROXY_WORKER_NOT_USABLE_BITMAP

#define PROXY_WORKER_NOT_USABLE_BITMAP
Value:
#define PROXY_WORKER_STOPPED
Definition mod_proxy.h:326
#define PROXY_WORKER_IN_ERROR
Definition mod_proxy.h:327
#define PROXY_WORKER_HC_FAIL
Definition mod_proxy.h:330
#define PROXY_WORKER_IN_SHUTDOWN
Definition mod_proxy.h:324
#define PROXY_WORKER_DISABLED
Definition mod_proxy.h:325

Definition at line 347 of file mod_proxy.h.

◆ PROXY_WORKER_RFC1035_NAME_SIZE

#define PROXY_WORKER_RFC1035_NAME_SIZE   512

Definition at line 391 of file mod_proxy.h.

◆ PROXY_WORKER_STOPPED

#define PROXY_WORKER_STOPPED   0x0040

Definition at line 326 of file mod_proxy.h.

◆ PROXY_WORKER_STOPPED_FLAG

#define PROXY_WORKER_STOPPED_FLAG   'S'

Definition at line 340 of file mod_proxy.h.

◆ PROXYPASS_INTERPOLATE

#define PROXYPASS_INTERPOLATE   0x02

Definition at line 130 of file mod_proxy.h.

◆ PROXYPASS_MAP_ENCODED

#define PROXYPASS_MAP_ENCODED   0x08

Definition at line 132 of file mod_proxy.h.

◆ PROXYPASS_MAP_SERVLET

#define PROXYPASS_MAP_SERVLET   0x18 /* + MAP_ENCODED */

Definition at line 133 of file mod_proxy.h.

◆ PROXYPASS_NOCANON

#define PROXYPASS_NOCANON   0x01

Definition at line 129 of file mod_proxy.h.

◆ PROXYPASS_NOQUERY

#define PROXYPASS_NOQUERY   0x04

Definition at line 131 of file mod_proxy.h.

Typedef Documentation

◆ ap_proxy_header_reverse_map_fn

typedef const char *(* ap_proxy_header_reverse_map_fn) (request_rec *, proxy_dir_conf *, const char *)

Definition at line 732 of file mod_proxy.h.

◆ apr_OFN_ajp_handle_cping_cpong_t

typedef apr_status_t() apr_OFN_ajp_handle_cping_cpong_t(apr_socket_t *sock, request_rec *r, apr_interval_time_t timeout)

Do a AJP CPING and wait for CPONG on the socket

Definition at line 1435 of file mod_proxy.h.

◆ apr_OFN_ap_proxy_clear_connection_t

typedef int() apr_OFN_ap_proxy_clear_connection_t(request_rec *r, apr_table_t *headers)

Clear the headers referenced by the Connection header from the given table, and remove the Connection header.

Parameters
rrequest
headerstable of headers to clear
Returns
1 if "close" was present, 0 otherwise.

Definition at line 1427 of file mod_proxy.h.

◆ apr_OFN_ap_proxy_retry_worker_t

typedef int() apr_OFN_ap_proxy_retry_worker_t(const char *proxy_function, proxy_worker *worker, server_rec *s)

Mark a worker for retry

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
workerworker used for retrying
scurrent server record
Returns
OK if marked for retry, DECLINED otherwise
Note
The error status of the worker will cleared if the retry interval has elapsed since the last error.

Definition at line 1106 of file mod_proxy.h.

◆ apr_OFN_balancer_manage_t

typedef apr_status_t() apr_OFN_balancer_manage_t(request_rec *, apr_table_t *params)

Configure and create workers (and balancer) in mod_balancer.

Parameters
rrequest
paramstable with the parameters like b=mycluster etc.
Returns
404 when the worker/balancer doesn't exist, 400 if something is invalid 200 for success.

Definition at line 1278 of file mod_proxy.h.

◆ apr_OFN_hc_select_exprs_t

typedef void() apr_OFN_hc_select_exprs_t(request_rec *, const char *)

Definition at line 635 of file mod_proxy.h.

◆ apr_OFN_hc_show_exprs_t

typedef void() apr_OFN_hc_show_exprs_t(request_rec *)

Definition at line 634 of file mod_proxy.h.

◆ apr_OFN_hc_valid_expr_t

typedef int() apr_OFN_hc_valid_expr_t(request_rec *, const char *)

Definition at line 636 of file mod_proxy.h.

◆ apr_OFN_proxy_balancer_get_best_worker_t

typedef proxy_worker *() apr_OFN_proxy_balancer_get_best_worker_t(proxy_balancer *balancer, request_rec *r, proxy_is_best_callback_fn_t *is_best, void *baton)

Definition at line 978 of file mod_proxy.h.

◆ apr_OFN_set_worker_hc_param_t

typedef const char *() apr_OFN_set_worker_hc_param_t(apr_pool_t *, server_rec *, proxy_worker *, const char *, const char *, void *)

Definition at line 639 of file mod_proxy.h.

◆ proxy_balancer

Definition at line 113 of file mod_proxy.h.

◆ proxy_balancer_method

Definition at line 116 of file mod_proxy.h.

◆ proxy_conn_pool

Definition at line 115 of file mod_proxy.h.

◆ proxy_HOOK_canon_handler_t

typedef int proxy_HOOK_canon_handler_t(request_rec *r, char *url)

Definition at line 653 of file mod_proxy.h.

◆ proxy_HOOK_check_trans_t

typedef int proxy_HOOK_check_trans_t(request_rec *r, const char *url)

Definition at line 651 of file mod_proxy.h.

◆ proxy_HOOK_create_req_t

typedef int proxy_HOOK_create_req_t(request_rec *r, request_rec *pr)

Definition at line 655 of file mod_proxy.h.

◆ proxy_HOOK_fixups_t

typedef int proxy_HOOK_fixups_t(request_rec *r)

Definition at line 656 of file mod_proxy.h.

◆ proxy_HOOK_post_request_t

typedef int proxy_HOOK_post_request_t(proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf)

post request hook. It is called after request for updating runtime balancer status.

Definition at line 677 of file mod_proxy.h.

◆ proxy_HOOK_pre_request_t

typedef int proxy_HOOK_pre_request_t(proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url)

pre request hook. It will return the most suitable worker at the moment and corresponding balancer. The url is rewritten from balancer://cluster/uri to scheme://host:port/uri and then the scheme_handler is called.

Definition at line 670 of file mod_proxy.h.

◆ proxy_HOOK_request_status_t

typedef int proxy_HOOK_request_status_t(int *status, request_rec *r)

request status hook It is called after all proxy processing has been done. This gives other modules a chance to create default content on failure, for example

Definition at line 685 of file mod_proxy.h.

◆ proxy_HOOK_scheme_handler_t

typedef int proxy_HOOK_scheme_handler_t(request_rec *r, proxy_worker *worker, proxy_server_conf *conf, char *url, const char *proxyhost, apr_port_t proxyport)

Definition at line 649 of file mod_proxy.h.

◆ proxy_HOOK_section_post_config_t

typedef int proxy_HOOK_section_post_config_t(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s, ap_conf_vector_t *section_config)

Definition at line 644 of file mod_proxy.h.

◆ proxy_is_best_callback_fn_t

typedef int() proxy_is_best_callback_fn_t(proxy_worker *current, proxy_worker *prev_best, void *baton)

Definition at line 955 of file mod_proxy.h.

◆ proxy_LINK_canon_handler_t

◆ proxy_LINK_check_trans_t

◆ proxy_LINK_create_req_t

◆ proxy_LINK_fixups_t

◆ proxy_LINK_post_request_t

◆ proxy_LINK_pre_request_t

◆ proxy_LINK_request_status_t

◆ proxy_LINK_scheme_handler_t

◆ proxy_LINK_section_post_config_t

◆ proxy_worker

Definition at line 114 of file mod_proxy.h.

Enumeration Type Documentation

◆ enctype

Enumerator
enc_path 
enc_search 
enc_user 
enc_fpath 
enc_parm 

Definition at line 75 of file mod_proxy.h.

◆ hcmethod_t

Enumerator
NONE 
TCP 
OPTIONS 
HEAD 
GET 
CPING 
PROVIDER 
OPTIONS11 
HEAD11 
GET11 
EOT 

Definition at line 83 of file mod_proxy.h.

◆ proxy_hash_t

Return a hash based on the passed string

Parameters
strstring to produce hash from
methodhashing method to use
Returns
hash as unsigned int
Enumerator
PROXY_HASHFUNC_DEFAULT 
PROXY_HASHFUNC_APR 
PROXY_HASHFUNC_FNV 

Definition at line 1234 of file mod_proxy.h.

Function Documentation

◆ ap_proxy_acquire_connection()

int ap_proxy_acquire_connection ( const char proxy_function,
proxy_conn_rec **  conn,
proxy_worker worker,
server_rec s 
)

Acquire a connection from worker connection pool

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connacquired connection
workerworker used for obtaining connection
scurrent server record
Returns
OK or HTTP_XXX error
Note
If the connection limit has been reached, the function will block until a connection becomes available or the timeout has elapsed.

< Module has handled this stage.

Definition at line 2755 of file proxy_util.c.

◆ ap_proxy_backend_broke()

void ap_proxy_backend_broke ( request_rec r,
apr_bucket_brigade brigade 
)

Signal the upstream chain that the connection to the backend broke in the middle of the response. This is done by sending an error bucket with status HTTP_BAD_GATEWAY and an EOS bucket up the filter chain.

Parameters
rcurrent request record of client request
brigadeThe brigade that is sent through the output filter chain

Definition at line 4239 of file proxy_util.c.

◆ ap_proxy_balancer_get_best_worker()

proxy_worker * ap_proxy_balancer_get_best_worker ( proxy_balancer balancer,
request_rec r,
proxy_is_best_callback_fn_t is_best,
void *  baton 
)

Retrieve the best worker in a balancer for the current request

Parameters
balancerbalancer for which to find the best worker
rcurrent request record
is_besta callback function provide by the lbmethod that determines if the current worker is best
batonan lbmethod-specific context pointer (baton) passed to the is_best callback
Returns
the best worker to be used for the request

Definition at line 1492 of file proxy_util.c.

◆ ap_proxy_buckets_lifetime_transform()

apr_status_t ap_proxy_buckets_lifetime_transform ( request_rec r,
apr_bucket_brigade from,
apr_bucket_brigade to 
)

Definition at line 5157 of file proxy_util.c.

◆ ap_proxy_c2hex()

void ap_proxy_c2hex ( int  ch,
char x 
)

Definition at line 173 of file proxy_util.c.

◆ ap_proxy_canon_netloc()

char * ap_proxy_canon_netloc ( apr_pool_t p,
char **const  urlp,
char **  userp,
char **  passwordp,
char **  hostp,
apr_port_t port 
)

Definition at line 342 of file proxy_util.c.

◆ ap_proxy_canonenc()

char * ap_proxy_canonenc ( apr_pool_t p,
const char x,
int  len,
enum enctype  t,
int  forcedec,
int  proxyreq 
)

Definition at line 321 of file proxy_util.c.

◆ ap_proxy_canonenc_ex()

char * ap_proxy_canonenc_ex ( apr_pool_t p,
const char x,
int  len,
enum enctype  t,
int  flags,
int  proxyreq 
)

< Reverse proxy

< Reverse proxy

Definition at line 220 of file proxy_util.c.

◆ ap_proxy_check_connection()

apr_status_t ap_proxy_check_connection ( const char scheme,
proxy_conn_rec conn,
server_rec server,
unsigned  max_blank_lines,
int  flags 
)

Check a connection to the backend

Parameters
schemecalling proxy scheme (http, ajp, ...)
connacquired connection
servercurrent server record
max_blank_lineshow many blank lines to consume, or zero for none (considered data)
flagsPROXY_CHECK_* bitmask
Returns
APR_SUCCESS: connection established, APR_ENOTEMPTY: connection established with data, APR_ENOSOCKET: not connected, APR_EINVAL: worker in error state (unusable), other: connection closed/aborted (remotely)

Definition at line 3676 of file proxy_util.c.

◆ ap_proxy_checkproxyblock()

int ap_proxy_checkproxyblock ( request_rec r,
proxy_server_conf conf,
apr_sockaddr_t uri_addr 
)

Definition at line 816 of file proxy_util.c.

◆ ap_proxy_checkproxyblock2()

int ap_proxy_checkproxyblock2 ( request_rec r,
proxy_server_conf conf,
const char hostname,
apr_sockaddr_t addr 
)

Test whether the hostname/address of the request are blocked by the ProxyBlock configuration.

Parameters
rrequest
confserver configuration
hostnamehostname from request URI
addrresolved address of hostname, or NULL if not known
Returns
OK on success, or else an error

< Module has handled this stage.

Definition at line 824 of file proxy_util.c.

◆ ap_proxy_conn_is_https()

int ap_proxy_conn_is_https ( conn_rec c)

Definition at line 3075 of file mod_proxy.c.

◆ ap_proxy_connect_backend()

int ap_proxy_connect_backend ( const char proxy_function,
proxy_conn_rec conn,
proxy_worker worker,
server_rec s 
)

Make a connection to the backend

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connacquired connection
workerconnection worker
scurrent server record
Returns
OK or HTTP_XXX error
Note
In case the socket already exists for conn, just check the link status.

< Module declines to handle

< TCP

< Receive buffer

< For SCTP sockets, this is mapped * to STCP_NODELAY internally.

< Keepalive

< Module has handled this stage.

< Module declines to handle

Definition at line 3770 of file proxy_util.c.

◆ ap_proxy_connect_to_backend()

int ap_proxy_connect_to_backend ( apr_socket_t **  newsock,
const char proxy_function,
apr_sockaddr_t backend_addr,
const char backend_name,
proxy_server_conf conf,
request_rec r 
)

< Receive buffer

< For SCTP sockets, this is mapped * to STCP_NODELAY internally.

Definition at line 2667 of file proxy_util.c.

◆ ap_proxy_connect_uds()

apr_status_t ap_proxy_connect_uds ( apr_socket_t sock,
const char uds_path,
apr_pool_t p 
)

Make a connection to a Unix Domain Socket (UDS) path

Parameters
sockUDS to connect
uds_pathUDS path to connect to
ppool to make the sock addr
Returns
APR_SUCCESS or error status

Definition at line 3625 of file proxy_util.c.

◆ ap_proxy_connection_create()

int ap_proxy_connection_create ( const char proxy_function,
proxy_conn_rec conn,
conn_rec c,
server_rec s 
)

Make a connection record for backend connection

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connacquired connection
cclient connection record (unused, deprecated)
scurrent server record
Returns
OK or HTTP_XXX error
Note
The function will return immediately if conn->connection is already set,

Definition at line 4180 of file proxy_util.c.

◆ ap_proxy_connection_create_ex()

int ap_proxy_connection_create_ex ( const char proxy_function,
proxy_conn_rec conn,
request_rec r 
)

Make a connection record for backend connection, using request dir config

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connacquired connection
rcurrent request record
Returns
OK or HTTP_XXX error
Note
The function will return immediately if conn->connection is already set,

Definition at line 4173 of file proxy_util.c.

◆ ap_proxy_connection_reusable()

int ap_proxy_connection_reusable ( proxy_conn_rec conn)

Determine if proxy connection can potentially be reused at the end of this request.

Parameters
connproxy connection
Returns
non-zero if reusable, 0 otherwise
Note
Even if this function returns non-zero, the connection may be subsequently marked for closure.

Definition at line 1602 of file proxy_util.c.

◆ ap_proxy_cookie_reverse_map()

const char * ap_proxy_cookie_reverse_map ( request_rec r,
proxy_dir_conf conf,
const char str 
)

< Reverse proxy

Definition at line 1000 of file proxy_util.c.

◆ ap_proxy_create_hdrbrgd()

int ap_proxy_create_hdrbrgd ( apr_pool_t p,
apr_bucket_brigade header_brigade,
request_rec r,
proxy_conn_rec p_conn,
proxy_worker worker,
proxy_server_conf conf,
apr_uri_t uri,
char url,
char server_portstr,
char **  old_cl_val,
char **  old_te_val 
)

Create a HTTP request header brigade, old_cl_val and old_te_val as required.

Parameters
ppool
header_brigadeheader brigade to use/fill
rrequest
p_connproxy connection rec
workerselected worker
confper-server proxy config
uriuri
urlurl
server_portstrport as string
old_cl_valstored old content-len val
old_te_valstored old TE val
Returns
OK or HTTP_EXPECTATION_FAILED

< Module has handled this stage.

< Reverse proxy

< Reverse proxy

Definition at line 4523 of file proxy_util.c.

◆ ap_proxy_de_socketfy()

const char * ap_proxy_de_socketfy ( apr_pool_t p,
const char url 
)

Strip a unix domain socket (UDS) prefix from the input URL

Parameters
ppool to allocate result from
urla URL potentially prefixed with a UDS path
Returns
URL with the UDS prefix removed

Definition at line 1938 of file mod_proxy.c.

◆ ap_proxy_define_balancer()

char * ap_proxy_define_balancer ( apr_pool_t p,
proxy_balancer **  balancer,
proxy_server_conf conf,
const char url,
const char alias,
int  do_malloc 
)

Define and Allocate space for the balancer to proxy configuration

Parameters
pmemory pool to allocate balancer from
balancerthe new balancer
confcurrent proxy server configuration
urlurl containing balancer name
aliasalias/fake-path to this balancer
do_malloctrue if shared struct should be malloced
Returns
error message or NULL if successful

Definition at line 1192 of file proxy_util.c.

◆ ap_proxy_define_match_worker()

char * ap_proxy_define_match_worker ( apr_pool_t p,
proxy_worker **  worker,
proxy_balancer balancer,
proxy_server_conf conf,
const char url,
int  do_malloc 
)

Define and Allocate space for the ap_strcmp_match()able worker to proxy configuration.

Parameters
pmemory pool to allocate worker from
workerthe new worker
balancerthe balancer that the worker belongs to
confcurrent proxy server configuration
urlurl containing worker name (produces match pattern)
do_malloctrue if shared struct should be malloced
Returns
error message or NULL if successful (*worker is new worker)
Deprecated:
Replaced by ap_proxy_define_worker_ex()

Definition at line 2193 of file proxy_util.c.

◆ ap_proxy_define_worker()

char * ap_proxy_define_worker ( apr_pool_t p,
proxy_worker **  worker,
proxy_balancer balancer,
proxy_server_conf conf,
const char url,
int  do_malloc 
)

Define and Allocate space for the worker to proxy configuration

Parameters
pmemory pool to allocate worker from
workerthe new worker
balancerthe balancer that the worker belongs to
confcurrent proxy server configuration
urlurl containing worker name
do_malloctrue if shared struct should be malloced
Returns
error message or NULL if successful (*worker is new worker)

Definition at line 2179 of file proxy_util.c.

◆ ap_proxy_define_worker_ex()

char * ap_proxy_define_worker_ex ( apr_pool_t p,
proxy_worker **  worker,
proxy_balancer balancer,
proxy_server_conf conf,
const char url,
unsigned int  mask 
)

Define and Allocate space for the worker to proxy configuration, of either PREFIXED or MATCHED type according to given mask

Parameters
pmemory pool to allocate worker from
workerthe new worker
balancerthe balancer that the worker belongs to
confcurrent proxy server configuration
urlurl containing worker name
maskbitmask of AP_PROXY_WORKER_IS_*
Returns
error message or NULL if successful (*worker is new worker)

Definition at line 1952 of file proxy_util.c.

◆ ap_proxy_determine_address()

apr_status_t ap_proxy_determine_address ( const char proxy_function,
proxy_conn_rec conn,
const char hostname,
apr_port_t  hostport,
unsigned int  flags,
request_rec r,
server_rec s 
)

Resolve an address, reusing the one of the worker if any.

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connproxy connection the address is used for
hostnamehost to resolve (should be the worker's if reusable)
hostportport to resolve (should be the worker's if reusable)
flagsbitmask of PROXY_DETERMINE_ADDRESS_*
rcurrent request (if any)
scurrent server (or NULL if r != NULL and ap_proxyerror() should be called on error)
Returns
APR_SUCCESS or an error, APR_EEXIST if the address is still the same and PROXY_DETERMINE_ADDRESS_CHECK is asked

Definition at line 2941 of file proxy_util.c.

◆ ap_proxy_determine_connection()

int ap_proxy_determine_connection ( apr_pool_t p,
request_rec r,
proxy_server_conf conf,
proxy_worker worker,
proxy_conn_rec conn,
apr_uri_t uri,
char **  url,
const char proxyname,
apr_port_t  proxyport,
char server_portstr,
int  server_portstr_size 
)

Determine backend hostname and port

Parameters
pmemory pool used for processing
rcurrent request
confcurrent proxy server configuration
workerworker used for processing request
connproxy connection struct
uriprocessed uri
urlrequest url
proxynameare we connecting directly or via a proxy
proxyportproxy host port
server_portstrVia headers server port, must be non-NULL
server_portstr_sizesize of the server_portstr buffer; must be at least one, even if the protocol doesn't use this
Returns
OK or HTTP_XXX error

< Module has handled this stage.

< Module has handled this stage.

Definition at line 3207 of file proxy_util.c.

◆ ap_proxy_find_balancershm()

proxy_balancer_shared * ap_proxy_find_balancershm ( ap_slotmem_provider_t storage,
ap_slotmem_instance_t slot,
proxy_balancer balancer,
unsigned int index 
)

Find the shm of the balancer as needed

Parameters
storageslotmem provider
slotslotmem instance
balancerbalancer of shm to find
indexpointer to index within slotmem of balancer
Returns
pointer to shm of balancer, or NULL

Definition at line 4435 of file proxy_util.c.

◆ ap_proxy_find_workershm()

proxy_worker_shared * ap_proxy_find_workershm ( ap_slotmem_provider_t storage,
ap_slotmem_instance_t slot,
proxy_worker worker,
unsigned int index 
)

Find the shm of the worker as needed

Parameters
storageslotmem provider
slotslotmem instance
workerworker to find
indexpointer to index within slotmem of worker
Returns
pointer to shm of worker, or NULL

Definition at line 4414 of file proxy_util.c.

◆ ap_proxy_fixup_uds_filename()

int ap_proxy_fixup_uds_filename ( request_rec r)

Definition at line 2487 of file proxy_util.c.

◆ ap_proxy_get_balancer()

proxy_balancer * ap_proxy_get_balancer ( apr_pool_t p,
proxy_server_conf conf,
const char url,
int  careactive 
)

Get the balancer from proxy configuration

Parameters
pmemory pool used for temporary storage while finding balancer
confcurrent proxy server configuration
urlurl to find the worker from; must have balancer:// prefix
careactivetrue if we care if the balancer is active or not
Returns
proxy_balancer or NULL if not found

Definition at line 1134 of file proxy_util.c.

◆ ap_proxy_get_worker()

proxy_worker * ap_proxy_get_worker ( apr_pool_t p,
proxy_balancer balancer,
proxy_server_conf conf,
const char url 
)

Get the worker from proxy configuration, both types

Parameters
pmemory pool used for finding worker
balancerthe balancer that the worker belongs to
confcurrent proxy server configuration
urlurl to find the worker from
Returns
proxy_worker or NULL if not found

Definition at line 1937 of file proxy_util.c.

◆ ap_proxy_get_worker_ex()

proxy_worker * ap_proxy_get_worker_ex ( apr_pool_t p,
proxy_balancer balancer,
proxy_server_conf conf,
const char url,
unsigned int  mask 
)

Get the worker from proxy configuration, looking for either PREFIXED or MATCHED or both types of workers according to given mask

Parameters
pmemory pool used for finding worker
balancerthe balancer that the worker belongs to
confcurrent proxy server configuration
urlurl to find the worker from
maskbitmask of AP_PROXY_WORKER_IS_*
Returns
proxy_worker or NULL if not found

Definition at line 1829 of file proxy_util.c.

◆ ap_proxy_hashfunc()

unsigned int ap_proxy_hashfunc ( const char str,
proxy_hash_t  method 
)

Definition at line 4267 of file proxy_util.c.

◆ ap_proxy_hex2c()

int ap_proxy_hex2c ( const char x)

Definition at line 118 of file proxy_util.c.

◆ ap_proxy_initialize_balancer()

apr_status_t ap_proxy_initialize_balancer ( proxy_balancer balancer,
server_rec s,
apr_pool_t p 
)

Initialize the balancer as needed

Parameters
balancerbalancer to initialize
scurrent server record
pmemory pool used for mutex and connection pool
Returns
APR_SUCCESS or error code

Definition at line 1320 of file proxy_util.c.

◆ ap_proxy_initialize_worker()

apr_status_t ap_proxy_initialize_worker ( proxy_worker worker,
server_rec s,
apr_pool_t p 
)

Initialize the worker by setting up worker connection pool and mutex

Parameters
workerworker to initialize
scurrent server record
pmemory pool used for mutex and connection pool
Returns
APR_SUCCESS or error code

Definition at line 2241 of file proxy_util.c.

◆ ap_proxy_is_socket_connected()

int ap_proxy_is_socket_connected ( apr_socket_t socket)
Parameters
socketsocket to test
Returns
TRUE if socket is connected/active

Definition at line 3501 of file proxy_util.c.

◆ ap_proxy_lb_workers()

int ap_proxy_lb_workers ( void  )

Calculate maximum number of workers in scoreboard.

Returns
number of workers to allocate in the scoreboard

Definition at line 4188 of file proxy_util.c.

◆ ap_proxy_location_reverse_map()

const char * ap_proxy_location_reverse_map ( request_rec r,
proxy_dir_conf conf,
const char url 
)

< Reverse proxy

Definition at line 882 of file proxy_util.c.

◆ ap_proxy_parse_wstatus()

char * ap_proxy_parse_wstatus ( apr_pool_t p,
proxy_worker w 
)

Create readable representation of worker status bitfield

Parameters
ppool
wworker to use
Returns
string representation of status

Definition at line 4311 of file proxy_util.c.

◆ ap_proxy_pass_brigade()

int ap_proxy_pass_brigade ( apr_bucket_alloc_t bucket_alloc,
request_rec r,
proxy_conn_rec p_conn,
conn_rec origin,
apr_bucket_brigade bb,
int  flush 
)
Parameters
bucket_allocbucket allocator
rrequest
p_connproxy connection
originconnection rec of origin
bbbrigade to send to origin
flushflush
Returns
status (OK)

< Module has handled this stage.

Definition at line 5062 of file proxy_util.c.

◆ ap_proxy_port_of_scheme()

apr_port_t ap_proxy_port_of_scheme ( const char scheme)

Return the port number of a known scheme (eg: http -> 80).

Parameters
schemescheme to test
Returns
port number or 0 if unknown

Definition at line 5122 of file proxy_util.c.

◆ ap_proxy_post_request()

int ap_proxy_post_request ( proxy_worker worker,
proxy_balancer balancer,
request_rec r,
proxy_server_conf conf 
)

Post request worker and balancer cleanup

Parameters
workerworker used for processing request
balancerbalancer used for processing request
rcurrent request
confcurrent proxy server configuration
Returns
OK or HTTP_XXX error
Note
Whenever the pre_request is called, the post_request has to be called too.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 2649 of file proxy_util.c.

◆ ap_proxy_pre_http_request()

int ap_proxy_pre_http_request ( conn_rec c,
request_rec r 
)

< Module has handled this stage.

Definition at line 876 of file proxy_util.c.

◆ ap_proxy_pre_request()

int ap_proxy_pre_request ( proxy_worker **  worker,
proxy_balancer **  balancer,
request_rec r,
proxy_server_conf conf,
char **  url 
)

Get the most suitable worker and/or balancer for the request

Parameters
workerworker used for processing request
balancerbalancer used for processing request
rcurrent request
confcurrent proxy server configuration
urlrequest url that balancer can rewrite.
Returns
OK or HTTP_XXX error
Note
It calls balancer pre_request hook if the url starts with balancer:// The balancer then rewrites the url to particular worker, like http://host:port

< Module declines to handle

< Module has handled this stage.

< Standard proxy

< Module has handled this stage.

< Reverse proxy

< Module has handled this stage.

< Module declines to handle

Definition at line 2591 of file proxy_util.c.

◆ ap_proxy_prefetch_input()

int ap_proxy_prefetch_input ( request_rec r,
proxy_conn_rec backend,
apr_bucket_brigade input_brigade,
apr_read_type_e  block,
apr_off_t bytes_read,
apr_off_t  max_read 
)

Prefetch the client request body (in memory), up to a limit. Read what's in the client pipe. If nonblocking is set and read is EAGAIN, pass a FLUSH bucket to the backend and read again in blocking mode.

Parameters
rclient request
backendbackend connection
input_brigadeinput brigade to use/fill
blockblocking or non-blocking mode
bytes_readnumber of bytes read
max_readmaximum number of bytes to read
Returns
OK or HTTP_* error code
Note
max_read is rounded up to APR_BUCKET_BUFF_SIZE

< Module has handled this stage.

Definition at line 4814 of file proxy_util.c.

◆ ap_proxy_read_input()

int ap_proxy_read_input ( request_rec r,
proxy_conn_rec backend,
apr_bucket_brigade input_brigade,
apr_off_t  max_read 
)

Read what's in the client pipe. If the read would block (EAGAIN), pass a FLUSH bucket to the backend and read again in blocking mode.

Parameters
rclient request
backendbackend connection
input_brigadebrigade to use/fill
max_readmaximum number of bytes to read
Returns
OK or HTTP_* error code

< Module has handled this stage.

< Module has handled this stage.

Definition at line 4898 of file proxy_util.c.

◆ ap_proxy_release_connection()

int ap_proxy_release_connection ( const char proxy_function,
proxy_conn_rec conn,
server_rec s 
)

Release a connection back to worker connection pool

Parameters
proxy_functioncalling proxy scheme (http, ajp, ...)
connacquired connection
scurrent server record
Returns
OK or HTTP_XXX error
Note
The connection will be closed if conn->close_on_release is set

< Module has handled this stage.

Definition at line 2809 of file proxy_util.c.

◆ ap_proxy_set_wstatus()

apr_status_t ap_proxy_set_wstatus ( char  c,
int  set,
proxy_worker w 
)

Set/unset the worker status bitfield depending on flag

Parameters
cflag
setset or unset bit
wworker to use
Returns
APR_SUCCESS if valid flag

Definition at line 4293 of file proxy_util.c.

◆ ap_proxy_share_balancer()

apr_status_t ap_proxy_share_balancer ( proxy_balancer balancer,
proxy_balancer_shared shm,
int  i 
)

Share a defined proxy balancer via shm

Parameters
balancerbalancer to be shared
shmlocation of shared info
iindex into shm
Returns
APR_SUCCESS or error code

Definition at line 1273 of file proxy_util.c.

◆ ap_proxy_share_worker()

apr_status_t ap_proxy_share_worker ( proxy_worker worker,
proxy_worker_shared shm,
int  i 
)

Share a defined proxy worker via shm

Parameters
workerworker to be shared
shmlocation of shared info
iindex into shm
Returns
APR_SUCCESS or error code

Definition at line 2209 of file proxy_util.c.

◆ ap_proxy_should_override()

int ap_proxy_should_override ( proxy_dir_conf conf,
int  code 
)

Returns 1 if a response with the given status should be overridden.

Parameters
confproxy directory configuration
codehttp status code
Returns
1 if code is considered an error-code, 0 otherwise

Definition at line 4225 of file proxy_util.c.

◆ ap_proxy_show_hcmethod()

const char * ap_proxy_show_hcmethod ( hcmethod_t  method)

Return the name of the health check method (eg: "OPTIONS").

Parameters
methodmethod enum
Returns
name of method

Definition at line 5784 of file proxy_util.c.

◆ ap_proxy_spool_input()

int ap_proxy_spool_input ( request_rec r,
proxy_conn_rec backend,
apr_bucket_brigade input_brigade,
apr_off_t bytes_spooled,
apr_off_t  max_mem_spool 
)

Spool the client request body to memory, or disk above given limit.

Parameters
rclient request
backendbackend connection
input_brigadeinput brigade to use/fill
bytes_spoolednumber of bytes spooled
max_mem_spoolmaximum number of in-memory bytes
Returns
OK or HTTP_* error code

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

Definition at line 4942 of file proxy_util.c.

◆ ap_proxy_ssl_connection_cleanup()

apr_status_t ap_proxy_ssl_connection_cleanup ( proxy_conn_rec conn,
request_rec r 
)

Definition at line 1688 of file proxy_util.c.

◆ ap_proxy_ssl_disable()

int ap_proxy_ssl_disable ( conn_rec c)

< Module has handled this stage.

Definition at line 3056 of file mod_proxy.c.

◆ ap_proxy_ssl_enable()

int ap_proxy_ssl_enable ( conn_rec c)

< Module has handled this stage.

Definition at line 3044 of file mod_proxy.c.

◆ ap_proxy_ssl_engine()

int ap_proxy_ssl_engine ( conn_rec c,
ap_conf_vector_t per_dir_config,
int  enable 
)

< Module has handled this stage.

Definition at line 3061 of file mod_proxy.c.

◆ ap_proxy_ssl_val()

const char * ap_proxy_ssl_val ( apr_pool_t p,
server_rec s,
conn_rec c,
request_rec r,
const char var 
)

Definition at line 3080 of file mod_proxy.c.

◆ ap_proxy_strncpy()

apr_status_t ap_proxy_strncpy ( char dst,
const char src,
apr_size_t  dlen 
)

Definition at line 94 of file proxy_util.c.

◆ ap_proxy_sync_balancer()

apr_status_t ap_proxy_sync_balancer ( proxy_balancer b,
server_rec s,
proxy_server_conf conf 
)

Sync balancer and workers based on any updates w/i shm

Parameters
bbalancer to check/update member list of
sserver rec
confconfig
Returns
APR_SUCCESS if all goes well

Definition at line 4329 of file proxy_util.c.

◆ ap_proxy_trans_match()

int ap_proxy_trans_match ( request_rec r,
struct proxy_alias ent,
proxy_dir_conf dconf 
)

Find the matched alias for this request and setup for proxy handler

Parameters
rrequest
entproxy_alias record
dconfper-dir config or NULL
Returns
OK if the alias matched, DONE if the alias matched and r->uri was normalized so no further transformation should happen on it, DECLINED if proxying is disabled for this alias, HTTP_CONTINUE if the alias did not match

< Module declines to handle

< Module declines to handle

< Module has handled this stage.

< Module declines to handle

< Reverse proxy

< Module has served the response completely * - it's safe to die() with no more output

< Module has handled this stage.

Definition at line 825 of file mod_proxy.c.

◆ ap_proxy_transfer_between_connections()

apr_status_t ap_proxy_transfer_between_connections ( request_rec r,
conn_rec c_i,
conn_rec c_o,
apr_bucket_brigade bb_i,
apr_bucket_brigade bb_o,
const char name,
int sent,
apr_off_t  bsize,
int  flags 
)

< Module has handled this stage.

< Module declines to handle

Definition at line 5205 of file proxy_util.c.

◆ ap_proxy_tunnel_create()

apr_status_t ap_proxy_tunnel_create ( proxy_tunnel_rec **  tunnel,
request_rec r,
conn_rec c_o,
const char scheme 
)

Create a tunnel, to be activated by ap_proxy_tunnel_run().

Parameters
tunneltunnel created
rclient request
c_oconnection to origin
schemecaller proxy scheme (connect, ws(s), http(s), ...)
Returns
APR_SUCCESS or error status

< Descriptors passed to apr_pollset_add() * are not copied

< Non-blocking IO

< Non-blocking IO

< Can write without blocking

< Pending error

< Can write without blocking

< Pending error

< Can read without blocking

< Hangup occurred

< Can write without blocking

< Pending error

< Can read without blocking

< Hangup occurred

Definition at line 5366 of file proxy_util.c.

◆ ap_proxy_tunnel_run()

int ap_proxy_tunnel_run ( proxy_tunnel_rec tunnel)

Forward anything from either side of the tunnel to the other, until one end aborts or a polling timeout/error occurs.

Parameters
tunneltunnel to run
Returns
OK if completion is full, HTTP_GATEWAY_TIME_OUT on timeout or another HTTP_ error otherwise.

< Module has handled this stage.

< Can read without blocking

< Can write without blocking

< Hangup occurred

< Pending error

< Can write without blocking

< Can write without blocking

< Can read without blocking

< Can read without blocking

< Hangup occurred

< Module has handled this stage.

< Module declines to handle

< Can write without blocking

< Can read without blocking

< Module has handled this stage.

< Can read without blocking

< Can read without blocking

< Hangup occurred

< Can write without blocking

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

< Module has handled this stage.

Definition at line 5617 of file proxy_util.c.

◆ ap_proxy_update_balancer()

char * ap_proxy_update_balancer ( apr_pool_t p,
proxy_balancer balancer,
const char url 
)

Update the balancer's vhost related fields

Parameters
pmemory pool used for temporary storage while finding balancer
balancerbalancer to be updated
urlurl to find vhost info
Returns
error string or NULL if OK

Definition at line 1168 of file proxy_util.c.

◆ ap_proxy_valid_balancer_name()

int ap_proxy_valid_balancer_name ( char name,
int  i 
)

Verifies valid balancer name (eg: balancer://foo)

Parameters
namename to test
inumber of chars to test; 0 for all.
Returns
true/false

Definition at line 1126 of file proxy_util.c.

◆ ap_proxy_worker_can_upgrade()

int ap_proxy_worker_can_upgrade ( apr_pool_t p,
const proxy_worker worker,
const char upgrade,
const char dflt 
)

Return whether a worker upgrade configuration matches Upgrade header

Parameters
pmemory pool used for displaying worker name
workerthe worker
upgradethe Upgrade header to match
dfltdefault protocol (NULL for none)
Returns
1 (true) or 0 (false)

Definition at line 1772 of file proxy_util.c.

◆ ap_proxy_worker_name()

char * ap_proxy_worker_name ( apr_pool_t p,
proxy_worker worker 
)

Return the user-land, UDS aware worker name

Parameters
pmemory pool used for displaying worker name
workerthe worker
Returns
name

Definition at line 1762 of file proxy_util.c.

◆ ap_proxyerror()

int ap_proxyerror ( request_rec r,
int  statuscode,
const char message 
)

Definition at line 432 of file proxy_util.c.

◆ proxy_hook_canon_handler()

void proxy_hook_canon_handler ( proxy_HOOK_canon_handler_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 3412 of file mod_proxy.c.

◆ proxy_hook_check_trans()

void proxy_hook_check_trans ( proxy_HOOK_check_trans_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 3409 of file mod_proxy.c.

◆ proxy_hook_create_req()

void proxy_hook_create_req ( proxy_HOOK_create_req_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ proxy_hook_fixups()

void proxy_hook_fixups ( proxy_HOOK_fixups_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ proxy_hook_get_canon_handler()

apr_array_header_t * proxy_hook_get_canon_handler ( void  )

Definition at line 3412 of file mod_proxy.c.

◆ proxy_hook_get_check_trans()

apr_array_header_t * proxy_hook_get_check_trans ( void  )

Definition at line 3409 of file mod_proxy.c.

◆ proxy_hook_get_create_req()

apr_array_header_t * proxy_hook_get_create_req ( void  )

◆ proxy_hook_get_fixups()

apr_array_header_t * proxy_hook_get_fixups ( void  )

◆ proxy_hook_get_post_request()

apr_array_header_t * proxy_hook_get_post_request ( void  )

Definition at line 3425 of file mod_proxy.c.

◆ proxy_hook_get_pre_request()

apr_array_header_t * proxy_hook_get_pre_request ( void  )

Definition at line 3419 of file mod_proxy.c.

◆ proxy_hook_get_request_status()

apr_array_header_t * proxy_hook_get_request_status ( void  )

◆ proxy_hook_get_scheme_handler()

apr_array_header_t * proxy_hook_get_scheme_handler ( void  )

Definition at line 3406 of file mod_proxy.c.

◆ proxy_hook_get_section_post_config()

apr_array_header_t * proxy_hook_get_section_post_config ( void  )

◆ proxy_hook_post_request()

void proxy_hook_post_request ( proxy_HOOK_post_request_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 3425 of file mod_proxy.c.

◆ proxy_hook_pre_request()

void proxy_hook_pre_request ( proxy_HOOK_pre_request_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 3419 of file mod_proxy.c.

◆ proxy_hook_request_status()

void proxy_hook_request_status ( proxy_HOOK_request_status_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ proxy_hook_scheme_handler()

void proxy_hook_scheme_handler ( proxy_HOOK_scheme_handler_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

Definition at line 3406 of file mod_proxy.c.

◆ proxy_hook_section_post_config()

void proxy_hook_section_post_config ( proxy_HOOK_section_post_config_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ proxy_run_canon_handler()

int proxy_run_canon_handler ( request_rec r,
char url 
)

< Module declines to handle

< Module declines to handle

Definition at line 3412 of file mod_proxy.c.

◆ proxy_run_check_trans()

int proxy_run_check_trans ( request_rec r,
const char url 
)

< Module declines to handle

< Module declines to handle

Definition at line 3409 of file mod_proxy.c.

◆ proxy_run_create_req()

int proxy_run_create_req ( request_rec r,
request_rec pr 
)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 92 of file proxy_util.c.

◆ proxy_run_fixups()

int proxy_run_fixups ( request_rec r)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 3434 of file mod_proxy.c.

◆ proxy_run_post_request()

int proxy_run_post_request ( proxy_worker worker,
proxy_balancer balancer,
request_rec r,
proxy_server_conf conf 
)

< Module declines to handle

< Module declines to handle

Definition at line 3425 of file mod_proxy.c.

◆ proxy_run_pre_request()

int proxy_run_pre_request ( proxy_worker **  worker,
proxy_balancer **  balancer,
request_rec r,
proxy_server_conf conf,
char **  url 
)

< Module declines to handle

< Module declines to handle

Definition at line 3419 of file mod_proxy.c.

◆ proxy_run_request_status()

int proxy_run_request_status ( int status,
request_rec r 
)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 3438 of file mod_proxy.c.

◆ proxy_run_scheme_handler()

int proxy_run_scheme_handler ( request_rec r,
proxy_worker worker,
proxy_server_conf conf,
char url,
const char proxyhost,
apr_port_t  proxyport 
)

< Module declines to handle

< Module declines to handle

Definition at line 3406 of file mod_proxy.c.

◆ proxy_run_section_post_config()

int proxy_run_section_post_config ( apr_pool_t p,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s,
ap_conf_vector_t section_config 
)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 3431 of file mod_proxy.c.

Variable Documentation

◆ proxy_hcmethods

proxy_hcmethods_t proxy_hcmethods[]
extern

Definition at line 47 of file mod_proxy.c.

◆ proxy_wstat_tbl

proxy_wstat_t proxy_wstat_tbl[]
extern

Definition at line 61 of file mod_proxy.c.