httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r426795 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Sat, 29 Jul 2006 13:08:38 GMT
Author: rpluem
Date: Sat Jul 29 06:08:38 2006
New Revision: 426795

URL: http://svn.apache.org/viewvc?rev=426795&view=rev
Log:
* some optimizations taken from the inflate out filter

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=426795&r1=426794&r2=426795&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Sat Jul 29 06:08:38 2006
@@ -299,14 +299,16 @@
     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 @@
                            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",



Mime
View raw message