From: William A. Rowe Jr Date: Fri, 5 Apr 2002 20:06:52 +0000 (+0000) Subject: Clean up breakage introduced recently that sent the wrong headers through X-Git-Tag: 2.0.35~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41354689f420e26c7e02ecf9f361e42f93e1f687;p=thirdparty%2Fapache%2Fhttpd.git Clean up breakage introduced recently that sent the wrong headers through the http_headers output filter. Now we will always point every filter at the 'redirected' request, e.g. the actual error message response rather than the request that failed. Reviewed by: JimJag, Rbb, DougM git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94467 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 7d3f82e3f19..9eabe3b56c3 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -305,6 +305,7 @@ static apr_table_t *rename_original_env(apr_pool_t *p, apr_table_t *t) static request_rec *internal_internal_redirect(const char *new_uri, request_rec *r) { int access_status; + ap_filter_t *f; request_rec *new = (request_rec *) apr_pcalloc(r->pool, sizeof(request_rec)); @@ -370,6 +371,22 @@ static request_rec *internal_internal_redirect(const char *new_uri, new->output_filters = new->proto_output_filters; new->input_filters = new->proto_input_filters; + f = new->input_filters; + while (f) { + if (f->r == r) { + f->r = new; + } + f = f->next; + } + + f = new->output_filters; + while (f) { + if (f->r == r) { + f->r = new; + } + f = f->next; + } + ap_add_input_filter("HTTP_IN", NULL, new, new->connection); apr_table_setn(new->subprocess_env, "REDIRECT_STATUS",