]> granicus.if.org Git - apache/commitdiff
* modules/proxy/mod_proxy_http.c
authorSander Striker <striker@apache.org>
Wed, 30 Mar 2005 22:58:08 +0000 (22:58 +0000)
committerSander Striker <striker@apache.org>
Wed, 30 Mar 2005 22:58:08 +0000 (22:58 +0000)
  (ap_proxy_http_process_response): When there are only headers and no body,
   give the remainder of the output filters a chance by pushing an EOS bucket
   through the filter stack.

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

modules/proxy/mod_proxy_http.c

index 1d6636765241e1400e06b1d0e435bf2750850023..60030d2d7d468236f28487bbf92c24fe462ac0c6 100644 (file)
@@ -1331,9 +1331,21 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
             }
             ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                          "proxy: end body send");
-        } else {
+        }
+        else {
             ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                          "proxy: header only");
+
+            /* strikerXXX: pass EOS bucket down the filter chain? */
+            e = apr_bucket_eos_create(c->bucket_alloc);
+            APR_BRIGADE_INSERT_TAIL(bb, e);
+            if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS
+                || c->aborted) {
+                /* Ack! Phbtt! Die! User aborted! */
+                backend->close = 1;  /* this causes socket close below */
+            }
+
+            apr_brigade_cleanup(bb);
         }
     } while (interim_response);