]> granicus.if.org Git - apache/commitdiff
Set the content encoding for compressed content
authorRainer Jung <rjung@apache.org>
Fri, 20 Mar 2009 17:38:39 +0000 (17:38 +0000)
committerRainer Jung <rjung@apache.org>
Fri, 20 Mar 2009 17:38:39 +0000 (17:38 +0000)
even if we can't detect the content type of the
uncompressed content.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@756678 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_mime_magic.c

index 96ac989ae9c86c43fb6c6b81ac1d542694349f13..cd7b491a6ffbff72e3455cc48d52119a618ad46f 100644 (file)
@@ -2100,12 +2100,12 @@ static int zmagic(request_rec *r, unsigned char *buf, apr_size_t nbytes)
         return 0;
 
     if ((newsize = uncompress(r, i, &newbuf, nbytes)) > 0) {
+        /* set encoding type in the request record */
+        r->content_encoding = compr[i].encoding;
+
         if (tryit(r, newbuf, newsize, 0) != OK) {
             return 0;
         }
-
-        /* set encoding type in the request record */
-        r->content_encoding = compr[i].encoding;
     }
     return 1;
 }