mod_proxy.h revision f23f4de4c164980ff577d99bbcbd5eea9dbb9cf2
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz/* Licensed to the Apache Software Foundation (ASF) under one or more
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz * contributor license agreements. See the NOTICE file distributed with
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * this work for additional information regarding copyright ownership.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * The ASF licenses this file to You under the Apache License, Version 2.0
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * (the "License"); you may not use this file except in compliance with
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * the License. You may obtain a copy of the License at
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @brief Proxy Extension Module for Apache
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @defgroup MOD_PROXY mod_proxy
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @ingroup APACHE_MODS
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes Also note numerous FIXMEs and CHECKMEs which should be eliminated.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz This code is once again experimental!
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz Things to do:
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz 1. Make it completely work (for FTP too)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz Chuck Murcko <chuck@topsail.org> 02-06-01
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes/* for proxy_canonenc() */
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes enc_path, enc_search, enc_user, enc_fpath, enc_parm
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz#else /*APR_CHARSET_EBCDIC*/
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz#endif /*APR_CHARSET_EBCDIC*/
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/* default Max-Forwards header setting */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/* static information about a remote proxy */
struct proxy_alias {
const char *real;
const char *fake;
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;
int preserve_host;
int preserve_host_set;
char timeout_set;
char badopt_set;
char proxy_status_set;
int interpolate_env;
const char *hostname;
int is_ssl;
#if APR_HAS_THREADS
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
char ping_timeout_set;
char retry_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 *);
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);
int ap_proxy_lb_workers(void);