]> granicus.if.org Git - apache/commitdiff
Always send the EOS on the correct request. Basically, we call
authorRyan Bloom <rbb@apache.org>
Tue, 24 Oct 2000 16:57:53 +0000 (16:57 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 24 Oct 2000 16:57:53 +0000 (16:57 +0000)
ap_finalize_request_protocol on the main request, then we find the
last internally re-directed request, and send the EOS on that request.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86735 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c
modules/http/http_request.c

index 32b17db9330283a95805b7b66f682218c3f1c41d..7c63305f7bcd3d294422c22128386feccd889492 100644 (file)
@@ -2331,6 +2331,9 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, ap_bu
  */
 AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r)
 {
+    while (r->next) {
+        r = r->next;
+    }
     /* tell the filter chain there is no more content coming */
     if (!r->eos_sent) {
         end_output_stream(r);
index cf71d3a713a8ede358a47900777206115d2b567e..7ab2f76ce21b822fc0fbfd9cb89f1c421441a4e1 100644 (file)
@@ -1403,7 +1403,6 @@ static request_rec *internal_internal_redirect(const char *new_uri,
                                               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));
 
@@ -1465,18 +1464,6 @@ static request_rec *internal_internal_redirect(const char *new_uri,
     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));