You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2019/09/30 17:42:07 UTC

svn commit: r1867789 - /httpd/apreq/trunk/library/util.c

Author: ylavic
Date: Mon Sep 30 17:42:07 2019
New Revision: 1867789

URL: http://svn.apache.org/viewvc?rev=1867789&view=rev
Log:
Fix apreq_brigade_concat() when spooling data.

Clear the old brigade before reusing it for spooled data, and fix the
offset and size args inversion when creating the file bucket.

Modified:
    httpd/apreq/trunk/library/util.c

Modified: httpd/apreq/trunk/library/util.c
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/library/util.c?rev=1867789&r1=1867788&r2=1867789&view=diff
==============================================================================
--- httpd/apreq/trunk/library/util.c (original)
+++ httpd/apreq/trunk/library/util.c Mon Sep 30 17:42:07 2019
@@ -1043,7 +1043,8 @@ APREQ_DECLARE(apr_status_t) apreq_brigad
         if (s != APR_SUCCESS)
             return s;
 
-        last_out = apr_bucket_file_create(file, wlen, 0,
+        apr_brigade_cleanup(out);
+        last_out = apr_bucket_file_create(file, 0, wlen,
                                           out->p, out->bucket_alloc);
         last_out->type = &spool_bucket_type;
         APR_BRIGADE_INSERT_TAIL(out, last_out);