mirror of
https://github.com/mirror/wget.git
synced 2025-03-27 12:30:19 +08:00
Fix another case of -N and -c not working well together.
This commit is contained in:
parent
29305e059f
commit
57584fe2da
@ -1,3 +1,10 @@
|
|||||||
|
2010-07-18 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
|
* http.c (gethttp): If -N is used, don't exit immediately if the content
|
||||||
|
length is less or equal than the existing file size. Specify "Range"
|
||||||
|
only if -N is not used.
|
||||||
|
Reported by: Caleb Cushing <xenoterracide@gmail.com>.
|
||||||
|
|
||||||
2010-07-14 Giuseppe Scrivano <gscrivano@gnu.org>
|
2010-07-14 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
* ftp.c (max): Remove definition.
|
* ftp.c (max): Remove definition.
|
||||||
|
@ -1645,7 +1645,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
request_set_header (req, "Referer", (char *) hs->referer, rel_none);
|
request_set_header (req, "Referer", (char *) hs->referer, rel_none);
|
||||||
if (*dt & SEND_NOCACHE)
|
if (*dt & SEND_NOCACHE)
|
||||||
request_set_header (req, "Pragma", "no-cache", rel_none);
|
request_set_header (req, "Pragma", "no-cache", rel_none);
|
||||||
if (hs->restval)
|
if (hs->restval && !opt.timestamping)
|
||||||
request_set_header (req, "Range",
|
request_set_header (req, "Range",
|
||||||
aprintf ("bytes=%s-",
|
aprintf ("bytes=%s-",
|
||||||
number_to_static_string (hs->restval)),
|
number_to_static_string (hs->restval)),
|
||||||
@ -2376,9 +2376,8 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
||||||
|| (hs->restval > 0 && statcode == HTTP_STATUS_OK
|
|| (!opt.timestamping && hs->restval > 0 && statcode == HTTP_STATUS_OK
|
||||||
&& contrange == 0 && hs->restval >= contlen)
|
&& contrange == 0 && hs->restval >= contlen))
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* If `-c' is in use and the file has been fully downloaded (or
|
/* If `-c' is in use and the file has been fully downloaded (or
|
||||||
the remote file has shrunk), Wget effectively requests bytes
|
the remote file has shrunk), Wget effectively requests bytes
|
||||||
|
Loading…
Reference in New Issue
Block a user