bugGNU Wget - Bugs: bug #47972, Partial download is overwritten...

 
 

bug #47972: Partial download is overwritten when invoked with -c (continue)

Submitted by:  None
Submitted on:  Sun 22 May 2016 05:17:08 AM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Janaka BandaraOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.17.1
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: trunkPlanned Release: None
Regression: NoneWork Required: None
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 26 May 2016 08:26:56 PM UTC, comment #3:

Fixed by commit 75e5be7aad0f52dac92908cb94f302a41ca715af which is in trunk (not released yet).

Tim Ruehsen <rockdaboot>
Project Administrator
Thu 26 May 2016 03:44:56 PM UTC, comment #2:

I'm on Ubuntu 16.04 (dist-upgraded from beta).

janaka@janaka-PC:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

And the wget manpage says "GNU Wget 1.17.1 ... 2016-01-08" at the bottom.

The package manager (apt) does not suggest any updates for wget (or documentation) either.

Anonymous
Thu 26 May 2016 02:00:24 PM UTC, comment #1:

What distro are you using and how was Wget packaged for it? Because you seem to be shown an older version of the man page. The manual pages were updated last year before release of 1.17.1 to reflect these changes in behaviour. The current latest manpage states:

" If you use -c on a non-empty file, and the server does not support continued downloading, Wget will restart the download from scratch and
overwrite the existing file entirely.

Beginning with Wget 1.7, if you use -c on a file which is of equal size as the one on the server, Wget will refuse to download the file and
print an explanatory message. The same happens when the file is smaller on the server than locally (presumably because it was changed on
the server since your last download attempt)---because "continuing" is not meaningful, no download occurs."

Darshit Shah <darnir>
Project Administrator
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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rockdaboot (Posted a comment)
  • -unavailable- added by darnir (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 May 2016 08:26:56 PM UTCrockdabootFixed Release1.17=>trunk
    Thu 26 May 2016 02:00:35 PM UTCdarnirOpen/ClosedOpen=>Closed
    Thu 26 May 2016 02:00:24 PM UTCdarnirStatusNone=>Fixed
      Fixed ReleaseNone=>1.17

    Back to the top


    Powered by Savane 3.1-cleanup1