]> granicus.if.org Git - apache/commitdiff
More fixes for core_input_filter()'s concatenation of small buckets:
authorBrian Pane <brianp@apache.org>
Mon, 26 Nov 2001 07:21:48 +0000 (07:21 +0000)
committerBrian Pane <brianp@apache.org>
Mon, 26 Nov 2001 07:21:48 +0000 (07:21 +0000)
update last_e and nbytes after compacting the brigade

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

server/core.c

index aeeaf92cbdd5fb4c59a73fe0321fb1141a719bf0..caf2d84ac9d79c22e695ec10ae8e623f62224e91 100644 (file)
@@ -3088,6 +3088,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
                             while (temp != e) {
                                 apr_bucket *d;
                                 rv = apr_bucket_read(temp, &str, &n, APR_BLOCK_READ);
+                                nbytes -= n;
                                 apr_brigade_write(temp_brig, NULL, NULL, str, n);
                                 d = temp;
                                 temp = APR_BUCKET_NEXT(temp);
@@ -3098,6 +3099,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
                             APR_BRIGADE_INSERT_HEAD(b, temp);
                             apr_brigade_destroy(temp_brig);
                             e = temp;
+                            last_e = e;
                             nvec = 0;
                             apr_bucket_read(e, &str, &n, APR_BLOCK_READ);
                         }