Commit 83a8e930 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* some optimizations taken from the inflate out filter


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426795 13f79535-47bb-0310-9956-ffa450edef68
parent 0f29de76
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -299,14 +299,16 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
    request_rec *r = f->r;
    deflate_ctx *ctx = f->ctx;
    int zRC;
    deflate_filter_config *c = ap_get_module_config(r->server->module_config,
                                                    &deflate_module);
    deflate_filter_config *c;

    /* Do nothing if asked to filter nothing. */
    if (APR_BRIGADE_EMPTY(bb)) {
        return ap_pass_brigade(f->next, bb);
    }

    c = ap_get_module_config(r->server->module_config,
                             &deflate_module);

    /* If we don't have a context, we need to ensure that it is okay to send
     * the deflated content.  If we have a context, that means we've done
     * this before and we liked it.
@@ -447,6 +449,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                           Z_DEFAULT_STRATEGY);

        if (zRC != Z_OK) {
            deflateEnd(&ctx->stream);
            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                          "unable to init Zlib: "
                          "deflateInit2 returned %d: URL %s",