]> granicus.if.org Git - apache/commitdiff
Something sets the content_encoding, even if a directory listing
authorMartin Kraemer <martin@apache.org>
Wed, 30 Jan 2002 14:56:42 +0000 (14:56 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 30 Jan 2002 14:56:42 +0000 (14:56 +0000)
is going to be returned. Hack: unset the content_encoding if
dirlisting == TRUE.

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

modules/proxy/proxy_ftp.c

index 89a628a67801df0a9402bf0cdf5ae76ebfd367c1..d18578fb249456b2a4a5357855a2dff5e7f0844c 100644 (file)
@@ -1561,7 +1561,14 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
     ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server,
                  "proxy: FTP: Content-Type set to %s", r->content_type);
 
-    /* set content-encoding */
+    /* If an encoding has been set by mistake, delete it.
+     * @@@ FIXME (e.g., for ftp://user@host/file*.tar.gz,
+     * @@@        the encoding is currently set to x-gzip)
+     */
+    if (dirlisting && r->content_encoding != NULL)
+        r->content_encoding = NULL;
+
+    /* set content-encoding (not for dir listings, they are uncompressed)*/
     if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
         ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server,
              "proxy: FTP: Content-Encoding set to %s", r->content_encoding);