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
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));
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",