]> granicus.if.org Git - apache/commitdiff
Back out the change to allocate files out of the main request pool, and
authorRyan Bloom <rbb@apache.org>
Thu, 14 Jun 2001 22:56:12 +0000 (22:56 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 14 Jun 2001 22:56:12 +0000 (22:56 +0000)
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

server/core.c
server/protocol.c

index b5f7aa5a598a907370a754c47c39e24788aa0932..b4b32e56fd3d21d67dd39c8ee527ad65f7aa67ca 100644 (file)
@@ -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;
index d0b9b2a094d65f51416467268cfb686a452a78db..09d40c02424dd1a588fa8498bc26c6ce1e3d175c 100644 (file)
@@ -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: