mod_proxy.h revision ccc522c90310b0dea82f04b45b2a4a479ea7109f
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* Licensed to the Apache Software Foundation (ASF) under one or more
769347ad4d35d43488eb98f980143495b0db415dStef Walter * contributor license agreements. See the NOTICE file distributed with
769347ad4d35d43488eb98f980143495b0db415dStef Walter * this work for additional information regarding copyright ownership.
769347ad4d35d43488eb98f980143495b0db415dStef Walter * The ASF licenses this file to You under the Apache License, Version 2.0
769347ad4d35d43488eb98f980143495b0db415dStef Walter * (the "License"); you may not use this file except in compliance with
df4e1db5d41c903ae57fd880acc76a0ad84aa7b2Pavel Březina * the License. You may obtain a copy of the License at
769347ad4d35d43488eb98f980143495b0db415dStef Walter * Unless required by applicable law or agreed to in writing, software
769347ad4d35d43488eb98f980143495b0db415dStef Walter * distributed under the License is distributed on an "AS IS" BASIS,
769347ad4d35d43488eb98f980143495b0db415dStef Walter * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
769347ad4d35d43488eb98f980143495b0db415dStef Walter * See the License for the specific language governing permissions and
769347ad4d35d43488eb98f980143495b0db415dStef Walter * limitations under the License.
769347ad4d35d43488eb98f980143495b0db415dStef Walter * @brief Proxy Extension Module for Apache
769347ad4d35d43488eb98f980143495b0db415dStef Walter * @defgroup MOD_PROXY mod_proxy
769347ad4d35d43488eb98f980143495b0db415dStef Walter * @ingroup APACHE_MODS
769347ad4d35d43488eb98f980143495b0db415dStef Walter Also note numerous FIXMEs and CHECKMEs which should be eliminated.
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* for proxy_canonenc() */
769347ad4d35d43488eb98f980143495b0db415dStef Walter enc_path, enc_search, enc_user, enc_fpath, enc_parm
769347ad4d35d43488eb98f980143495b0db415dStef Walter#else /*APR_CHARSET_EBCDIC*/
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek#endif /*APR_CHARSET_EBCDIC*/
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek/* default Max-Forwards header setting */
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek/* Set this to -1, which complies with RFC2616 by not setting
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek * max-forwards if the client didn't send it to us.
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* static information about a remote proxy */
769347ad4d35d43488eb98f980143495b0db415dStef Walter const char *scheme; /* the schemes handled by this proxy, or '*' */
769347ad4d35d43488eb98f980143495b0db415dStef Walter const char *protocol; /* the scheme used to talk to this proxy */
769347ad4d35d43488eb98f980143495b0db415dStef Walter const char *hostname; /* the hostname of this proxy */
4f7f714e118e95896fac5239c7a8b529c39a4758Jakub Hrozek ap_regex_t *regexp; /* compiled regex (if any) for the remote */
df4e1db5d41c903ae57fd880acc76a0ad84aa7b2Pavel Březina int use_regex; /* simple boolean. True if we have a regex pattern */
struct proxy_alias {
const char *real;
const char *fake;
unsigned int flags;
struct dirconn_entry {
char *name;
struct noproxy_entry {
const char *name;
char req_set;
char viaopt_set;
char recv_buffer_size_set;
char io_buffer_size_set;
long maxfwd;
char maxfwd_set;
int error_override;
int error_override_set;
char timeout_set;
char badopt_set;
char proxy_status_set;
int interpolate_env;
int preserve_host;
int preserve_host_set;
const char *hostname;
int is_ssl;
#if APR_HAS_THREADS
struct proxy_conn_pool {
#if APR_HAS_THREADS
#define PROXY_WORKER_IS_INITIALIZED(f) ( (f)->s && \
#define PROXY_WORKER_IS_STANDBY(f) ( (f)->s && \
#define PROXY_WORKER_IS_USABLE(f) ( (f)->s && \
int status;
struct proxy_worker {
const char *name;
char timeout_set;
apr_interval_time_t acquire; /* acquire timeout when the maximum number of connections is exceeded */
char acquire_set;
char recv_buffer_size_set;
char io_buffer_size_set;
char keepalive;
char keepalive_set;
int is_address_reusable;
#if APR_HAS_THREADS
char ping_timeout_set;
char retry_set;
char disablereuse;
char disablereuse_set;
char conn_timeout_set;
struct proxy_balancer {
char max_attempts_set;
#if APR_HAS_THREADS
struct proxy_balancer_method {
request_rec *r);
#if APR_HAS_THREADS
#if !defined(WIN32)
#define PROXY_DECLARE_DATA
#define PROXY_DECLARE_DATA
char *url))
request_rec *r,
/* proxy_util.c */
PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr);
PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, size_t bufflen, int *eos);
PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **, const char *, apr_sockaddr_t *, const char *, proxy_server_conf *, server_rec *, apr_pool_t *);
request_rec *r);
PROXY_DECLARE(const char *) ap_proxy_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var);
PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r, proxy_dir_conf *conf, const char *url);
PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r, proxy_dir_conf *conf, const char *str);
#if !defined(WIN32)
proxy_dir_conf *, const char *);
proxy_dir_conf *, const char *);
proxy_dir_conf *, const char *);
proxy_dir_conf *, const char *);
const char *url);
apr_pool_t *p,
const char *url);
server_rec *s);
server_rec *s,
apr_pool_t *p);
const char *url);
apr_pool_t *p,
const char *url);
* The balancer then rewrites the url to particular worker, like http://host:port
request_rec *r,
char **url);
request_rec *r,
char **url,
const char *proxyname,
char *server_portstr,
int server_portstr_size);
server_rec *s);
server_rec *s);
server_rec *s);
server_rec *s);
int ap_proxy_lb_workers(void);