httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r910326 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Mon, 15 Feb 2010 20:12:08 GMT
Author: sf
Date: Mon Feb 15 20:12:07 2010
New Revision: 910326

URL: http://svn.apache.org/viewvc?rev=910326&view=rev
Log:
Correctly handle the case where apr_brigade_partition() returns APR_INCOMPLETE
and bkt points to the sentinel of ctx->proc_bb and not the sentinel of bb.

Submitted by: Joe Schaefer <joe_schaefer yahoo com>

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=910326&r1=910325&r2=910326&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Mon Feb 15 20:12:07 2010
@@ -1019,11 +1019,13 @@
     }
 
     if (!APR_BRIGADE_EMPTY(ctx->proc_bb)) {
-        /* May return APR_INCOMPLETE which is fine by us. */
-        apr_brigade_partition(ctx->proc_bb, readbytes, &bkt);
-
-        APR_BRIGADE_CONCAT(bb, ctx->proc_bb);
-        apr_brigade_split_ex(bb, bkt, ctx->proc_bb);
+        if (apr_brigade_partition(ctx->proc_bb, readbytes, &bkt) == APR_INCOMPLETE)
{
+            APR_BRIGADE_CONCAT(bb, ctx->proc_bb);
+        }
+        else {
+            APR_BRIGADE_CONCAT(bb, ctx->proc_bb);
+            apr_brigade_split_ex(bb, bkt, ctx->proc_bb);
+        }
     }
 
     return APR_SUCCESS;



Mime
View raw message