mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
No change, but they won't let me have foo
(and ... this is the module with a function addit_dammit !!!) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@581030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -98,16 +98,16 @@ static int proxy_http_canon(request_rec *r, char *url)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Clear all connection-based headers from the incoming headers table */
|
/* Clear all connection-based headers from the incoming headers table */
|
||||||
typedef struct foo {
|
typedef struct header_dptr {
|
||||||
apr_pool_t *pool;
|
apr_pool_t *pool;
|
||||||
apr_table_t *table;
|
apr_table_t *table;
|
||||||
apr_time_t time;
|
apr_time_t time;
|
||||||
} foo;
|
} header_dptr;
|
||||||
static ap_regex_t *warn_rx;
|
static ap_regex_t *warn_rx;
|
||||||
static int clean_warning_headers(void *data, const char *key, const char *val)
|
static int clean_warning_headers(void *data, const char *key, const char *val)
|
||||||
{
|
{
|
||||||
apr_table_t *headers = ((foo*)data)->table;
|
apr_table_t *headers = ((header_dptr*)data)->table;
|
||||||
apr_pool_t *pool = ((foo*)data)->pool;
|
apr_pool_t *pool = ((header_dptr*)data)->pool;
|
||||||
char *warning;
|
char *warning;
|
||||||
char *date;
|
char *date;
|
||||||
apr_time_t warn_time;
|
apr_time_t warn_time;
|
||||||
@@ -115,7 +115,7 @@ static int clean_warning_headers(void *data, const char *key, const char *val)
|
|||||||
ap_regmatch_t pmatch[3];
|
ap_regmatch_t pmatch[3];
|
||||||
|
|
||||||
if (headers == NULL) {
|
if (headers == NULL) {
|
||||||
((foo*)data)->table = headers = apr_table_make(pool, 2);
|
((header_dptr*)data)->table = headers = apr_table_make(pool, 2);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Parse this, suckers!
|
* Parse this, suckers!
|
||||||
@@ -145,7 +145,7 @@ static int clean_warning_headers(void *data, const char *key, const char *val)
|
|||||||
pmatch[2].rm_eo - pmatch[2].rm_so);
|
pmatch[2].rm_eo - pmatch[2].rm_so);
|
||||||
warn_time = apr_date_parse_http(date);
|
warn_time = apr_date_parse_http(date);
|
||||||
}
|
}
|
||||||
if (!warn_time || (warn_time == ((foo*)data)->time)) {
|
if (!warn_time || (warn_time == ((header_dptr*)data)->time)) {
|
||||||
apr_table_addn(headers, key, warning);
|
apr_table_addn(headers, key, warning);
|
||||||
}
|
}
|
||||||
val += pmatch[0].rm_eo;
|
val += pmatch[0].rm_eo;
|
||||||
@@ -154,7 +154,7 @@ static int clean_warning_headers(void *data, const char *key, const char *val)
|
|||||||
}
|
}
|
||||||
static apr_table_t *ap_proxy_clean_warnings(apr_pool_t *p, apr_table_t *headers)
|
static apr_table_t *ap_proxy_clean_warnings(apr_pool_t *p, apr_table_t *headers)
|
||||||
{
|
{
|
||||||
foo x;
|
header_dptr x;
|
||||||
x.pool = p;
|
x.pool = p;
|
||||||
x.table = NULL;
|
x.table = NULL;
|
||||||
x.time = apr_date_parse_http(apr_table_get(headers, "Date"));
|
x.time = apr_date_parse_http(apr_table_get(headers, "Date"));
|
||||||
@@ -169,8 +169,8 @@ static apr_table_t *ap_proxy_clean_warnings(apr_pool_t *p, apr_table_t *headers)
|
|||||||
}
|
}
|
||||||
static int clear_conn_headers(void *data, const char *key, const char *val)
|
static int clear_conn_headers(void *data, const char *key, const char *val)
|
||||||
{
|
{
|
||||||
apr_table_t *headers = ((foo*)data)->table;
|
apr_table_t *headers = ((header_dptr*)data)->table;
|
||||||
apr_pool_t *pool = ((foo*)data)->pool;
|
apr_pool_t *pool = ((header_dptr*)data)->pool;
|
||||||
const char *name;
|
const char *name;
|
||||||
char *next = apr_pstrdup(pool, val);
|
char *next = apr_pstrdup(pool, val);
|
||||||
while (*next) {
|
while (*next) {
|
||||||
@@ -187,7 +187,7 @@ static int clear_conn_headers(void *data, const char *key, const char *val)
|
|||||||
}
|
}
|
||||||
static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
|
static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
|
||||||
{
|
{
|
||||||
foo x;
|
header_dptr x;
|
||||||
x.pool = p;
|
x.pool = p;
|
||||||
x.table = headers;
|
x.table = headers;
|
||||||
apr_table_unset(headers, "Proxy-Connection");
|
apr_table_unset(headers, "Proxy-Connection");
|
||||||
|
Reference in New Issue
Block a user