Commit 00b53217 authored by Sander Striker's avatar Sander Striker
Browse files

Submitted by: Rüdiger Pluem <r.pluem@t-online.de>

* server/core.c

  (default_handler): Always give the filters a chance at processing
   the response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178018 13f79535-47bb-0310-9956-ffa450edef68
parent b0982bb6
Loading
Loading
Loading
Loading
+37 −33
Original line number Diff line number Diff line
@@ -3492,18 +3492,19 @@ static int default_handler(request_rec *r)
        ap_set_etag(r);
        apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");
        ap_set_content_length(r, r->finfo.size);

        bb = apr_brigade_create(r->pool, c->bucket_alloc);

        if ((errstatus = ap_meets_conditions(r)) != OK) {
            apr_file_close(fd);
            return errstatus;
            r->status = errstatus;
        } 

        else {
            if (bld_content_md5) {
                apr_table_setn(r->headers_out, "Content-MD5",
                               ap_md5digest(r->pool, fd));
            }

        bb = apr_brigade_create(r->pool, c->bucket_alloc);

            /* For platforms where the size of the file may be larger than
             * that which can be stored in a single bucket (where the
             * length field is an apr_size_t), split it into several
@@ -3522,9 +3523,10 @@ static int default_handler(request_rec *r)
                }
                e->length = (apr_size_t)fsize; /* Resize just the last bucket */
            }
        else
            else {
                e = apr_bucket_file_create(fd, 0, (apr_size_t)r->finfo.size,
                                           r->pool, c->bucket_alloc);
            }

#if APR_HAS_MMAP
            if (d->enable_mmap == ENABLE_MMAP_OFF) {
@@ -3532,6 +3534,8 @@ static int default_handler(request_rec *r)
            }
#endif
            APR_BRIGADE_INSERT_TAIL(bb, e);
        }

        e = apr_bucket_eos_create(c->bucket_alloc);
        APR_BRIGADE_INSERT_TAIL(bb, e);