Accepting request 527657 from network:utilities

OBS-URL: https://build.opensuse.org/request/show/527657
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wget?expand=0&rev=47
This commit is contained in:
Dominique Leuenberger 2017-09-25 11:54:16 +00:00 committed by Git OBS Bridge
commit 6da81f3a57
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Index: wget-1.19.1/src/http.c
===================================================================
--- wget-1.19.1.orig/src/http.c
+++ wget-1.19.1/src/http.c
@@ -3819,6 +3819,16 @@ gethttp (const struct url *u, struct url
}
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
+ && hs->restval < (contlen + contrange))
+ {
+ /* The file was not completely downloaded,
+ yet the server claims the range is invalid.
+ Bail out. */
+ CLOSE_INVALIDATE (sock);
+ retval = RANGEERR;
+ goto cleanup;
+ }
+ if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|| (!opt.timestamping && hs->restval > 0 && statcode == HTTP_STATUS_OK
&& contrange == 0 && contlen >= 0 && hs->restval >= contlen))
{

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 21 06:45:00 UTC 2017 - josef.moellers@suse.com
- Retry http GET when server responds with "416 Requested Range
Not Satisfiable" but file is not complete.
[boo#1058204, wget-416-but-file-not-complete.patch]
-------------------------------------------------------------------
Tue Mar 7 13:40:10 UTC 2017 - josef.moellers@suse.com

View File

@ -34,6 +34,7 @@ Patch6: wget-1.14-no-ssl-comp.patch
Patch7: wget-fix-pod-syntax.diff
Patch8: wget-errno-clobber.patch
Patch9: wget-CVE-2017-6508.patch
Patch10: wget-416-but-file-not-complete.patch
BuildRequires: automake
BuildRequires: gpgme-devel >= 0.4.2
BuildRequires: libcares-devel
@ -81,6 +82,7 @@ This can be done in script files or via the command line.
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
%if 0%{?suse_version} > 1110