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

svn commit: r124220 - /httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c

Author: trawick
Date: Wed Jan  5 07:25:12 2005
New Revision: 124220

URL: http://svn.apache.org/viewcvs?view=rev&rev=124220
Log:
the check for EOS isn't going to work if we already
deleted the eos; we ended up sending the last piece
of data from the client twice; I had (poorly) modified
the EOS section from the normal idiom to keep from having
to deal with the EOS later when reusing the input
brigade

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

Modified: httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c?view=diff&rev=124220&p1=httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c&r1=124219&p2=httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c&r2=124220
==============================================================================
--- httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c	(original)
+++ httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c	Wed Jan  5 07:25:12 2005
@@ -335,16 +335,16 @@
         if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
             seen_eos = 1;
 
-            /* We can't pass this EOS to the output_filters. */
-            e = APR_BRIGADE_LAST(input_brigade);
-            apr_bucket_delete(e);
-
             /* 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);
         }
 
         apr_brigade_length(input_brigade, 1, &bytes);
@@ -392,6 +392,10 @@
         b = header_brigade;
     }
     else {
+        /* input brigade still has an EOS which we can't pass to the output_filters. */
+        e = APR_BRIGADE_LAST(input_brigade);
+        AP_DEBUG_ASSERT(APR_BUCKET_IS_EOS(e));
+        apr_bucket_delete(e);
         e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF
                                        /* <trailers> */
                                        ASCII_CRLF,