Update to the latest upstream version

Fix issue with decompressing with broken web servers (#1532233)

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2018-01-22 15:23:12 +01:00
parent 0646b68da4
commit 205d36e30c
4 changed files with 9 additions and 52 deletions

2
.gitignore vendored
View File

@ -12,3 +12,5 @@ wget-1.12.tar.bz2
/wget-1.19.tar.xz
/wget-1.19.1.tar.xz
/wget-1.19.2.tar.gz
/wget-1.19.4.tar.lz
/wget-1.19.4.tar.gz

View File

@ -1 +1 @@
SHA512 (wget-1.19.2.tar.gz) = a0f8afcc0767a8fd1acd64b1b1b27d177bc938e70cc3709c1b3faa6c1426ec926642cd8e49d292cec0268ee507683539b5152072110106de5a728a03efd8cedd
SHA512 (wget-1.19.4.tar.gz) = e84b0c40235b160ade69e18f2f139c782eb2387edc97a847c11dbb906c0273daf6d0ef5afe20360ba965c7da8b5e109f5a45e39ea93d20ec945575203235943a

View File

@ -1,46 +0,0 @@
diff --git a/src/http.c b/src/http.c
index dc31823..47de828 100644
--- a/src/http.c
+++ b/src/http.c
@@ -3712,22 +3712,30 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
&& opt.compression != compression_none)
{
/* Make sure the Content-Type is not gzip before decompressing */
- const char * p = strchr (type, '/');
- if (p == NULL)
- {
- hs->remote_encoding = ENC_GZIP;
- hs->local_encoding = ENC_NONE;
- }
- else
+ if (type)
{
- p++;
- if (c_tolower(p[0]) == 'x' && p[1] == '-')
- p += 2;
- if (0 != c_strcasecmp (p, "gzip"))
+ const char * p = strchr (type, '/');
+ if (p == NULL)
{
hs->remote_encoding = ENC_GZIP;
hs->local_encoding = ENC_NONE;
}
+ else
+ {
+ p++;
+ if (c_tolower(p[0]) == 'x' && p[1] == '-')
+ p += 2;
+ if (0 != c_strcasecmp (p, "gzip"))
+ {
+ hs->remote_encoding = ENC_GZIP;
+ hs->local_encoding = ENC_NONE;
+ }
+ }
+ }
+ else
+ {
+ hs->remote_encoding = ENC_GZIP;
+ hs->local_encoding = ENC_NONE;
}
}
#endif

View File

@ -1,15 +1,13 @@
Summary: A utility for retrieving files using the HTTP or FTP protocols
Name: wget
Version: 1.19.2
Release: 2%{?dist}
Version: 1.19.4
Release: 1%{?dist}
License: GPLv3+
Group: Applications/Internet
Url: http://www.gnu.org/software/wget/
Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz
Patch1: wget-1.17-path.patch
# http://git.savannah.gnu.org/cgit/wget.git/commit/?id=973c26ed7d51052a7b6e120ed1b84e47266667e1
Patch2: wget-1.19.2-fix-segfault-in-http-c.patch
Provides: webclient
Provides: bundled(gnulib)
@ -37,7 +35,6 @@ sed -i "s|\(PACKAGE_STRING='wget .*\)'|\1 (Red Hat modified)'|" configure
grep "PACKAGE_STRING='wget .* (Red Hat modified)'" configure || exit 1
%patch1 -p1 -b .path
%patch2 -p1 -b .http_segfault
%build
%configure \
@ -84,6 +81,10 @@ rm -rf $RPM_BUILD_ROOT
%{_infodir}/*
%changelog
* Mon Jan 22 2018 Tomas Hozza <thozza@redhat.com> - 1.19.4-1
- Update to the latest upstream version
- Fix issue with decompressing with broken web servers (#1532233)
* Fri Dec 08 2017 Tomas Hozza <thozza@redhat.com> - 1.19.2-2
- Fix segfault when calling strchr in http.c (#1511562)