mod_proxy.h revision 50ebf0554e0878bf4e9ee9a3cb574f29323e9692
55cf6e01272ec475edea32aa9b7923de2d36cb42Christian Maeder/* Copyright 1999-2005 The Apache Software Foundation or its licensors, as
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova * Licensed under the Apache License, Version 2.0 (the "License");
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * you may not use this file except in compliance with the License.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova * 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
b2e01ef1b5d4c7a62260eb792291e8e1b10e545bIulia Ignatov * @defgroup MOD_PROXY mod_proxy
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova * @ingroup APACHE_MODS
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova Also note numerous FIXMEs and CHECKMEs which should be eliminated.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova This code is once again experimental!
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova 1. Make it completely work (for FTP too)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova Chuck Murcko <chuck@topsail.org> 02-06-01
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakova/* for proxy_canonenc() */
a669e4685b32ff5ca1bca785eacc5e30a545b010Christian Maeder enc_path, enc_search, enc_user, enc_fpath, enc_parm
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova#else /*APR_CHARSET_EBCDIC*/
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova#endif /*APR_CHARSET_EBCDIC*/
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova/* default Max-Forwards header setting */
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova/* static information about a remote proxy */
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova const char *scheme; /* the schemes handled by this proxy, or '*' */
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova const char *protocol; /* the scheme used to talk to this proxy */
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maeder const char *hostname; /* the hostname of this proxy */
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova apr_port_t port; /* the port for this proxy */
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova ap_regex_t *regexp; /* compiled regex (if any) for the remote */
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova int use_regex; /* simple boolean. True if we have a regex pattern */
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova int (*matcher) (struct dirconn_entry * This, request_rec *r);
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;
int preserve_host;
int preserve_host_set;
char timeout_set;
char badopt_set;
char proxy_status_set;
const char *hostname;
int is_ssl;
struct proxy_conn_pool {
#if APR_HAS_THREADS
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
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 *);
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);
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);
#define PROXY_HAS_SCOREBOARD 0
int ap_proxy_lb_workers(void);