Sun 22 May 2016 05:17:08 AM UTC, original submission:
According to wget's manpage, it is supposed to refuse a download if invoked with --continue, if a partially downloaded file already exists but the server does not support continuation:
"Beginning with Wget 1.7, if you use -c on a non-empty file, and it turns out that the server does not support continued downloading, Wget will refuse to start the download from scratch, which would effectively ruin existing contents. If you really want the download to start from scratch, remove the file."
However, when I try to resume the download of a partial file (cancelled during an earlier wget attempt) with the file present in the working directory, wget starts overwriting it from the beginning without any warning or hesitation:
janaka@janaka-PC:~/Downloads$ ls -l *.gz
-rw------- 1 janaka janaka 48812776 May 15 17:54 0.7.3.tar.gz
janaka@janaka-PC:~/Downloads$ wget -d -c -O 0.7.3.tar.gz https://codeload.github.com/ethereum/mist/tar.gz/0.7.3
Setting --continue (continue) to 1
Setting --output-document (outputdocument) to 0.7.3.tar.gz
DEBUG output created by Wget 1.17.1 on linux-gnu.
Reading HSTS entries from /home/janaka/.wget-hsts
URI encoding = ‘UTF-8’
--2016-05-22 10:38:51-- https://codeload.github.com/ethereum/mist/tar.gz/0.7.3
Resolving codeload.github.com (codeload.github.com)... 192.30.252.145
Caching codeload.github.com => 192.30.252.145
Connecting to codeload.github.com (codeload.github.com)|192.30.252.145|:443... connected.
Created socket 4.
Releasing 0x0000557bc24e2d90 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 4 to SSL handle 0x0000557bc24e3cb0
certificate:
subject: CN=*.github.com,O=GitHub\\, Inc.,L=San Francisco,ST=California,C=US
issuer: CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US
X509 certificate successfully verified and matches host codeload.github.com
---request begin---
GET /ethereum/mist/tar.gz/0.7.3 HTTP/1.1
Range: bytes=48812776-
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: /
Accept-Encoding: identity
Host: codeload.github.com
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
Connection: close
Access-Control-Allow-Origin: https://render.githubusercontent.com
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'
X-XSS-Protection: 1; mode=block
X-Frame-Options: deny
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Vary: Authorization,Accept-Encoding
ETag: "ac9cae71b9b0dc51dae88b009b1607da576ec01a"
Content-Type: application/x-gzip
Content-Disposition: attachment; filename=mist-0.7.3.tar.gz
Date: Sun, 22 May 2016 05:09:37 GMT
X-GitHub-Request-Id: 3DF5AD97:DD64:3F4D5F:57413F10
---response end---
200 OK
Parsed Strict-Transport-Security max-age = 31536000, includeSubDomains = false
Updated HSTS host: codeload.github.com:443 (max-age: 31536000, includeSubdomains: false)
Length: unspecified [application/x-gzip]
Saving to: ‘0.7.3.tar.gz’
0.7.3.tar.gz [ <=> ] 14.15K 34.0KB/s ^C
The same happens if I do not specify the filename with -O.
|