proxy_util.c revision db9ac238bf63d7df2bebbaff4de1628a32151028
124N/A * Apache Software Foundation (http://www.apache.org/)."
124N/A#define CORE_PRIVATE
1792N/A#include "mod_proxy.h"
1792N/A#include "http_core.h"
1776N/A#include "http_main.h"
1776N/A#include "http_log.h"
1776N/A#include "util_uri.h"
765N/A#include "apr_pools.h"
765N/Aint ap_proxy_hex2c(const char *x)
124N/A#ifndef CHARSET_EBCDIC
#ifndef CHARSET_EBCDIC
int isenc)
int i, j, ch;
if (t == enc_path)
else if (t == enc_search)
else if (t == enc_user)
else if (t == enc_fpath)
if (t == enc_path)
else if (t == enc_search)
for (i = 0, j = 0; i < len; i++, j++) {
ch = x[i];
y[j] = ch;
return NULL;
y[j] = ch;
return NULL;
r->connection = c;
int len;
return NULL;
++value;
return resp_hdrs;
int ok;
total_bytes_rcvd = 0;
#ifdef CHARSET_EBCDIC
alternate_timeouts = 0;
alternate_timeouts = 0;
if (c != NULL) {
ap_proxy_cache_error(&c);
else if(cntr == 0) break;
ap_proxy_cache_error(&c);
written += n;
if (completion) {
if (!ok)
ap_proxy_cache_error(&c);
o += cntr;
ap_rflush(r);
return total_bytes_rcvd;
int len, i;
if (p != NULL) {
i = p - list;
while (apr_isspace(*p));
list = p;
int ap_proxy_hex2sec(const char *x)
int i, ch;
ch = x[i];
void ap_proxy_sec2hex(int t, char *y)
int i, ch;
ap_cache_el_finalize((*c));
*c = NULL;
return statuscode;
return NULL;
return r->hostname;
return NULL;
url = apr_pstrdup(r->pool, &url[1]); /* make it point to "//", which is what proxy_canon_netloc expects */
int i, quads;
long bits;
char *tmp;
char *tmp;
++addr;
--quads;
/* "IP Address should be given in dotted-quad form, optionally followed by a netmask (e.g., 192.168.111.0/24)"; */
char **ip_listptr;
const char *found;
#if DEBUGGING
#if DEBUGGING
#if DEBUGGING
#if DEBUGGING
#if DEBUGGING
--d_len;
--h_len;
char **ptrs;
char **aliases;
return NULL;
return newent;
int h2_len;
int h1_len;
unsigned long *ip_list;
if (*ip_list == ? ? ? ? ? ? ? ? ? ? ? ? ?)
--h2_len;
--h1_len;
return rv;
/* (from proxy_http.c and proxy_ftp.c) */
if (!r->assbackwards)
return len;
#if defined WIN32
switch (reason) {
case DLL_PROCESS_ATTACH:
case DLL_THREAD_DETACH:
if (memptr) {
return TRUE;
#if defined(WIN32)
return &sptd;
return NULL;
return HTTP_INTERNAL_SERVER_ERROR;
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
if((r->status != HTTP_OK && r->status != HTTP_MOVED_PERMANENTLY && r->status != HTTP_NOT_MODIFIED) ||
r->header_only ||
if(!h) return DECLINED;
return DECLINED;