Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 44229 invoked by uid 500); 23 Oct 2000 10:31:48 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 44166 invoked by uid 500); 23 Oct 2000 10:31:47 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 23 Oct 2000 10:31:46 -0000 Message-ID: <20001023103146.44140.qmail@locus.apache.org> From: rbb@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/main http_request.c rbb 00/10/23 03:31:45 Modified: src/main http_request.c Log: Fix internal redirects. They should have their own HTTP_HEADER filter instance, and we need to remove the main-request's HTTP_HEADER. Revision Changes Path 1.66 +14 -0 apache-2.0/src/main/http_request.c Index: http_request.c =================================================================== RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- http_request.c 2000/10/18 22:14:18 1.65 +++ http_request.c 2000/10/23 10:31:44 1.66 @@ -1403,6 +1403,7 @@ request_rec *r) { int access_status; core_request_config *req_cfg; + ap_filter_t *fdel; request_rec *new = (request_rec *) apr_pcalloc(r->pool, sizeof(request_rec)); @@ -1462,6 +1463,19 @@ new->output_filters = r->connection->output_filters; new->input_filters = r->connection->input_filters; + ap_add_output_filter("HTTP_HEADER", NULL, new, new->connection); + + /* On an internal redirect, the redirect will take care of the headers, + * so we have to remove the main-request's HTTP_HEADER filter + */ + fdel = r->output_filters; + while (fdel) { + if (!strcmp(fdel->frec->name, "HTTP_HEADER")) { + ap_remove_output_filter(fdel); + break; + } + fdel = fdel->next; + } apr_table_setn(new->subprocess_env, "REDIRECT_STATUS", apr_psprintf(r->pool, "%d", r->status));