]> granicus.if.org Git - apache/commitdiff
Allow the core_output_filter to deal with multiple file buckets in the
authorRyan Bloom <rbb@apache.org>
Tue, 23 Jan 2001 23:23:37 +0000 (23:23 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 23 Jan 2001 23:23:37 +0000 (23:23 +0000)
same brigade.

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

modules/http/http_core.c

index 2755949da42648841981255edc175bf348f50e0f..aaa64f9065623703d54c07d138c5a269eec7a205 100644 (file)
@@ -3356,6 +3356,16 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
             else if (APR_BUCKET_IS_FILE(e) && (e->length >= AP_MIN_SENDFILE_BYTES)) {
                 apr_bucket_shared *s = e->data;
                 apr_bucket_file *a = s->data;
+
+                /* We can't handle more than one file bucket at a time
+                 * so we split here and send the file we have already found.
+                 */
+                if (fd) {
+                    more = apr_brigade_split(b, APR_BUCKET_NEXT(e));
+                    ap_save_brigade(f, &ctx->b, &more);
+                    break;
+                }
+
                 fd = a->fd;
                 flen = e->length;
                 foffset = s->start;