wget/Revert-Bail-out-on-unexpected-416-server-errors.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

2019-09-30 11:19:50 -04:00
From 11fad3fa72c5622efbbc57b5a12c355de695726a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
Date: Fri, 9 Nov 2018 16:16:43 +0100
Subject: [PATCH 41/83] Revert "Bail out on unexpected 416 server errors"
This reverts commit 6f3b9959935ad7640bcf48a0a93848ed25ff8963.
The code is obviously wrong, see https://savannah.gnu.org/bugs/?54963
Also, the example from the original post doesn't work any more.
With other words, the broken server behavior has been fixed meanwhile.
---
src/http.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/http.c b/src/http.c
index e3f5639a..d77762f8 100644
--- a/src/http.c
+++ b/src/http.c
@@ -3965,16 +3965,6 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
}
}
- 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))
--
2.19.1