Commit 8751e389 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Add a pool to the ap_save_brigade prototype. This removes a todo from

the comments that is really necessary before the setaside stuff will
work properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89362 13f79535-47bb-0310-9956-ffa450edef68
parent b87b9b94
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -378,9 +378,10 @@ AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f);
 *             new bucket brigade is returned in this location.
 * @param b The bucket brigade to save aside.  This brigade is always empty
 *          on return
 * @param p Ensure that all data in the brigade lives as long as this pool
 */
AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, apr_bucket_brigade **save_to,
                                         apr_bucket_brigade **b);    
                                         apr_bucket_brigade **b, apr_pool_t *p);    

/**
 * Flush function for apr_brigade_* calls.  This calls ap_pass_brigade
+1 −1
Original line number Diff line number Diff line
@@ -2620,7 +2620,7 @@ static void send_parsed_content(apr_bucket_brigade **bb, request_rec *r,
            }
                           /* Set aside tag, pass pre-tag... */
            tag_and_after = apr_brigade_split(*bb, ctx->head_start_bucket);
            ap_save_brigade(f, &ctx->ssi_tag_brigade, &tag_and_after);
            ap_save_brigade(f, &ctx->ssi_tag_brigade, &tag_and_after, r->pool);
            ap_pass_brigade(f->next, *bb);
            ctx->bytes_parsed = 0;
        }
+1 −1
Original line number Diff line number Diff line
@@ -2282,7 +2282,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
     * we SHOULD return the data in the same order it was requested. 
     */
    if (!APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
        ap_save_brigade(f, &ctx->bb, &bb);
        ap_save_brigade(f, &ctx->bb, &bb, r->pool);
        return APR_SUCCESS;
    }

+2 −2
Original line number Diff line number Diff line
@@ -3173,7 +3173,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
                apr_brigade_destroy(b);
            }
            else {
                ap_save_brigade(f, &ctx->b, &b);
                ap_save_brigade(f, &ctx->b, &b, c->pool);
            }
            return APR_SUCCESS;
        }
+2 −2
Original line number Diff line number Diff line
@@ -881,7 +881,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f,
    }

    if ((ctx->curr_len < AP_MIN_BYTES_TO_WRITE) && !send_it) {
        return ap_save_brigade(f, &ctx->saved, &b);
        return ap_save_brigade(f, &ctx->saved, &b, r->pool);
    }

    /* We will compute a content length if:
@@ -911,7 +911,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f,
         * filter until we have the entire content length
         */
        if (!send_it) {
            ap_save_brigade(f, &ctx->saved, &b);
            ap_save_brigade(f, &ctx->saved, &b, r->pool);
            return APR_SUCCESS;
        }
        ap_set_content_length(r, r->bytes_sent);
Loading