summaryrefslogtreecommitdiffstats
path: root/modules/http
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2002-03-03 03:15:52 +0100
committerRyan Bloom <rbb@apache.org>2002-03-03 03:15:52 +0100
commit9ac46ee31003b103374dec95f766a4f477a76535 (patch)
tree332b53ae59b3cbe637d33d3111820a56eb2b6bbc /modules/http
parentreuse existing private key if possible for all SSLPassPhraseDialog (diff)
downloadapache2-9ac46ee31003b103374dec95f766a4f477a76535.tar.xz
apache2-9ac46ee31003b103374dec95f766a4f477a76535.zip
Fix the mod_dir/mod_negotiation bug, where redirects and sub requests
were not getting the correct filters. This is done by creating a location in the request rec that holds protocol level filters. Protocol level filters survive for one request, from the time the request is received from the user to the time the response is sent. r->output_filters now stores the request level filters, which are only valid for the lifetime of one request_rec. This patch works, but it is not complete. The second half of the problem is that add_any_filter doesn't check where it puts the filters that it adds, so it is possible for filters to be put on this wrong list, and for filters to be lost completely during request processing. That half of the fix will be coming in the next day or so. Submitted by: Will Rowe, Justin Erenkrantz, Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93682 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r--modules/http/http_request.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index 244c346cf1..b1763edbe9 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -391,8 +391,11 @@ static request_rec *internal_internal_redirect(const char *new_uri,
new->read_length = r->read_length; /* We can only read it once */
new->vlist_validator = r->vlist_validator;
- new->output_filters = r->connection->output_filters;
- new->input_filters = r->connection->input_filters;
+ new->proto_output_filters = r->proto_output_filters;
+ new->proto_input_filters = r->proto_input_filters;
+
+ new->output_filters = new->proto_output_filters;
+ new->input_filters = new->proto_input_filters;
ap_add_input_filter("HTTP_IN", NULL, new, new->connection);
@@ -441,6 +444,9 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
r->err_headers_out);
r->subprocess_env = apr_table_overlay(r->pool, rr->subprocess_env,
r->subprocess_env);
+
+ r->output_filters = rr->output_filters;
+ r->input_filters = rr->input_filters;
}
AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r)