mod_proxy.h revision 748859d4eeb90f2a64b8b8318bc45c3a61dcd968
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova/* Licensed to the Apache Software Foundation (ASF) under one or more
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * contributor license agreements. See the NOTICE file distributed with
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * this work for additional information regarding copyright ownership.
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova * The ASF licenses this file to You under the Apache License, Version 2.0
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * (the "License"); you may not use this file except in compliance with
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * the License. You may obtain a copy of the License at
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * http://www.apache.org/licenses/LICENSE-2.0
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * Unless required by applicable law or agreed to in writing, software
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * distributed under the License is distributed on an "AS IS" BASIS,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * See the License for the specific language governing permissions and
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * limitations under the License.
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova * @brief Proxy Extension Module for Apache
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * @defgroup MOD_PROXY mod_proxy
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova * @ingroup APACHE_MODS
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova/* for proxy_canonenc() */
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova enc_path, enc_search, enc_user, enc_fpath, enc_parm
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maeder#else /*APR_CHARSET_EBCDIC*/
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakova#endif /*APR_CHARSET_EBCDIC*/
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova/* default Max-Forwards header setting */
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova/* Set this to -1, which complies with RFC2616 by not setting
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova * max-forwards if the client didn't send it to us.
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova/* static information about a remote proxy */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova const char *scheme; /* the schemes handled by this proxy, or '*' */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova const char *protocol; /* the scheme used to talk to this proxy */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova const char *hostname; /* the hostname of this proxy */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova ap_regex_t *regexp; /* compiled regex (if any) for the remote */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova int use_regex; /* simple boolean. True if we have a regex pattern */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova apr_port_t port; /* the port for this proxy */
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova int (*matcher) (struct dirconn_entry * This, request_rec *r);
long maxfwd;
signed char interpolate_env;
const char *hostname;
struct proxy_conn_pool {
int status;
apr_interval_time_t acquire; /* acquire timeout when the maximum number of connections is exceeded */
struct proxy_worker {
struct proxy_balancer {
struct proxy_balancer_method {
request_rec *r);
#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 *, request_rec *);
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);
const char *url);
PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_worker_shared *shm, int i);
server_rec *s,
apr_pool_t *p);
const char *url);
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);
PROXY_DECLARE(unsigned int)
int ap_proxy_lb_workers(void);