From d0a5d9f13104c14c076323ea186a1e8e2f452457 Mon Sep 17 00:00:00 2001 From: Darshit Shah <darnir@gnu.org> Date: Sun, 21 Jan 2018 10:41:08 +0100 Subject: [PATCH] Switch off compression by default Gzip compression has a number of bugs which need to be ironed out before we can support it by default. Some of these stem from a misunderstanding of the HTTP spec, but a lot of them are also due to many web servers not being compliant with RFC 7231. With this commit, I am marking GZip compression support as experimental in GNU Wget pending further investigation and the addition of tests. * src/init.c (defaults): Switch of compression support by default * docs/wget.texi: State that compression is experimental --- doc/wget.texi | 7 +++++-- src/init.c | 2 +- src/main.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/wget.texi b/doc/wget.texi index 3ec609f9..0aa7b435 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1543,10 +1543,13 @@ If @samp{auto} or @samp{gzip} are specified, Wget asks the server to compress the file using the gzip compression format. If the server compresses the file and responds with the @code{Content-Encoding} header field set appropriately, the file will be decompressed -automatically. This is the default. +automatically. If @samp{none} is specified, wget will not ask the server to compress -the file and will not decompress any server responses. +the file and will not decompress any server responses. This is the default. + +Compression support is currently experimental. In case it is turned on, +please report any bugs to @code{bug-wget@gnu.org}. @cindex redirect @item --max-redirect=@var{number} diff --git a/src/init.c b/src/init.c index 5c6fb7d7..6807e361 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 8382ab02..d19437e0 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"),