mod_proxy.h revision f1657d3c568280b03d07d2ea82b4374cb2ed74eb
dad2046d5cccd18914c910a7c36362483d1f2ad8nd/* Licensed to the Apache Software Foundation (ASF) under one or more
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi * contributor license agreements. See the NOTICE file distributed with
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * this work for additional information regarding copyright ownership.
d3e250aab242db84d14060985b5db675a731d548nd * The ASF licenses this file to You under the Apache License, Version 2.0
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * (the "License"); you may not use this file except in compliance with
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * the License. You may obtain a copy of the License at
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * Unless required by applicable law or agreed to in writing, software
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem * distributed under the License is distributed on an "AS IS" BASIS,
b5a5b130125a9f00d7f8d65d2313068ababb59e9humbedooh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * See the License for the specific language governing permissions and
dad2046d5cccd18914c910a7c36362483d1f2ad8nd * limitations under the License.
#ifndef MOD_PROXY_H
#define MOD_PROXY_H
* @file mod_proxy.h
#include "apr_hooks.h"
#include "apr.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_buckets.h"
#include "apr_md5.h"
#include "apr_network_io.h"
#include "apr_pools.h"
#include "apr_strings.h"
#include "apr_uri.h"
#include "apr_date.h"
#include "apr_strmatch.h"
#include "apr_fnmatch.h"
#include "apr_reslist.h"
#define APR_WANT_STRFUNC
#include "apr_want.h"
#include "apr_uuid.h"
#include "util_mutex.h"
#include "apr_global_mutex.h"
#include "apr_thread_mutex.h"
#include "httpd.h"
#include "http_config.h"
#include "ap_config.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_vhost.h"
#include "http_main.h"
#include "http_log.h"
#include "http_connection.h"
#include "util_filter.h"
#include "util_ebcdic.h"
#include "ap_provider.h"
#include "ap_slotmem.h"
enum enctype {
struct proxy_remote {
struct proxy_alias {
const char *real;
const char *fake;
unsigned int flags;
struct dirconn_entry {
char *name;
struct noproxy_entry {
const char *name;
const char *id;
long maxfwd;
signed char interpolate_env;
const char *hostname;
struct proxy_conn_pool {
/* Keep below in sync with proxy_util.c! */
#define PROXY_COPY_CONF_PARAMS(w, c) \
apr_interval_time_t acquire; /* acquire timeout when the maximum number of connections is exceeded */
struct proxy_worker {
int hash;
struct proxy_balancer {
int hash;
struct proxy_balancer_method {
request_rec *r);
#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)
#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,
int do_malloc);
server_rec *s,
apr_pool_t *p);
const char *url);
const char *url,
const char *alias,
int do_malloc);
server_rec *s,
apr_pool_t *p);
* 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);
server_rec *s,
int ap_proxy_lb_workers(void);