Commit c80c92a0 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Back out the change to allocate files out of the main request pool, and

implement pool-based setaside for FILE and MMAP buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89370 13f79535-47bb-0310-9956-ffa450edef68
parent 517cc7dd
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2930,7 +2930,6 @@ static int default_handler(request_rec *r)
     *     when the charset is translated).
     */
    int bld_content_md5;
    apr_pool_t *main_pool;

    /*
     * The old way of doing handlers meant that this handler would
@@ -2975,9 +2974,8 @@ static int default_handler(request_rec *r)
    if (r->method_number != M_GET && r->method_number != M_POST) {
        return HTTP_METHOD_NOT_ALLOWED;
    }
    main_pool = (r->main) ? (r->main->pool) : (r->pool);

    if ((status = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY, 0, main_pool)) != APR_SUCCESS) {
    if ((status = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->pool)) != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
		     "file permissions deny server access: %s", r->filename);
        return HTTP_FORBIDDEN;
+1 −1
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, r->pool);
        return ap_save_brigade(f, &ctx->saved, &b, (r->main) ? r->main->pool : r->pool);
    }

    /* We will compute a content length if: