You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2005/08/08 05:01:41 UTC

svn commit: r230736 - /httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c

Author: wrowe
Date: Sun Aug  7 20:01:39 2005
New Revision: 230736

URL: http://svn.apache.org/viewcvs?rev=230736&view=rev
Log:

  Backport r230735, we need not look at the first bucket for EOS, 
  because the outer while loop protected us from that case.  

  Backport the header brigade changes as it's impossible to have
  a body request waiting for a final send.  Look at seen_eos to 
  flush us in the request body loop, and handle the only exception,
  (header_brigade), outside of that loop.

  This brings stream_reqbody_cl in sync with the trunk.

Modified:
    httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c

Modified: httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c?rev=230736&r1=230735&r2=230736&view=diff
==============================================================================
--- httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c (original)
+++ httpd/httpd/branches/proxy-reqbody-2.0.x/modules/proxy/proxy_http.c Sun Aug  7 20:01:39 2005
@@ -586,13 +586,6 @@
         if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
             seen_eos = 1;
 
-            /* As a shortcut, if this brigade is simply an EOS bucket,
-             * don't send anything down the filter chain.
-             */
-            if (APR_BUCKET_IS_EOS(APR_BRIGADE_FIRST(input_brigade))) {
-                break;
-            }
-
             /* We can't pass this EOS to the output_filters. */
             e = APR_BRIGADE_LAST(input_brigade);
             apr_bucket_delete(e);
@@ -622,7 +615,8 @@
             b = input_brigade;
         }
         
-        status = pass_brigade(bucket_alloc, r, p_conn, origin, b, 0);
+        /* Once we hit EOS, we are ready to flush. */
+        status = pass_brigade(bucket_alloc, r, p_conn, origin, b, seen_eos);
         if (status != APR_SUCCESS) {
             return status;
         }
@@ -649,15 +643,11 @@
 
     if (header_brigade) {
         /* we never sent the header brigade since there was no request
-         * body; send it now
+         * body; send it now with the flush flag
          */
         b = header_brigade;
+        status = pass_brigade(bucket_alloc, r, p_conn, origin, b, 1);
     }
-    else {
-        /* need to flush any pending data */
-        b = input_brigade; /* empty now; pass_brigade() will add flush */
-    }
-    status = pass_brigade(bucket_alloc, r, p_conn, origin, b, 1);
     return status;
 }