summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:22 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:22 +0900
commitbe7885cb38b145fc4361200b3351fc2c79e35f3c (patch)
tree74b4dd183cb74fc723fb2f6c30bc816c9e8debcd /src
parent8abe09f3b00fd31d1af24d3038f881034506d651 (diff)
downloadwget-be7885cb38b145fc4361200b3351fc2c79e35f3c.tar.gz
wget-be7885cb38b145fc4361200b3351fc2c79e35f3c.tar.bz2
wget-be7885cb38b145fc4361200b3351fc2c79e35f3c.zip
Imported Upstream version 1.19.4upstream/1.19.4
Diffstat (limited to 'src')
-rw-r--r--src/http.c5
-rw-r--r--src/init.c2
-rw-r--r--src/main.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/http.c b/src/http.c
index 1cd2768..5bbaa52 100644
--- a/src/http.c
+++ b/src/http.c
@@ -3717,7 +3717,7 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
/* Make sure the Content-Type is not gzip before decompressing */
if (type)
{
- const char * p = strchr (type, '/');
+ p = strchr (type, '/');
if (p == NULL)
{
hs->remote_encoding = ENC_GZIP;
@@ -3744,8 +3744,9 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
/* don't uncompress if a file ends with '.gz' or '.tgz' */
if (hs->remote_encoding == ENC_GZIP
&& (p = strrchr(u->file, '.'))
- && (c_strcasecmp(p, ".gz") || c_strcasecmp(p, ".tgz")))
+ && (c_strcasecmp(p, ".gz") == 0 || c_strcasecmp(p, ".tgz") == 0))
{
+ DEBUGP (("Enabling broken server workaround. Will not decompress this GZip file.\n"));
hs->remote_encoding = ENC_NONE;
}
}
diff --git a/src/init.c b/src/init.c
index 5c6fb7d..6807e36 100644
--- a/src/init.c
+++ b/src/init.c
@@ -451,7 +451,7 @@ defaults (void)
#endif
#ifdef HAVE_LIBZ
- opt.compression = compression_auto;
+ opt.compression = compression_none;
#endif
/* The default for file name restriction defaults to the OS type. */
diff --git a/src/main.c b/src/main.c
index 8382ab0..d19437e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -777,7 +777,7 @@ HTTP options:\n"),
--header=STRING insert STRING among the headers\n"),
#ifdef HAVE_LIBZ
N_("\
- --compression=TYPE choose compression, one of auto, gzip and none\n"),
+ --compression=TYPE choose compression, one of auto, gzip and none. (default: none)\n"),
#endif
N_("\
--max-redirect maximum redirections allowed per page\n"),