bugGNU Wget - Bugs: bug #54963, wget -c treats a 416 response as a...


bug #54963: wget -c treats a 416 response as a failure

Submitter:  Svein Ove Aas <baughn>
Submitted:  Mon 05 Nov 2018 03:39:50 PM UTC
Category:  Protocol Issue Severity:  3 - Normal
Priority:  5 - Normal Status:  Confirmed
Privacy:  Public Assigned to:  rockdaboot
Originator Name:  Open/Closed:  Closed
Release:  1.19.2 Operating System:  None
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  1.19.6 Regression:  Yes
Work Required:  None Patch Included:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Fri 09 Nov 2018 03:22:44 PM UTC, comment #4: 

The commit has been reverted. Thanks for reporting.

Tim Ruehsen <rockdaboot>
Project Administrator
Tue 06 Nov 2018 09:34:25 AM UTC, comment #3: 

Sorry, I have to correct myself.

You are right, it is a regression introduced in 1.19.2 (commit 6f3b99599).

Tim Ruehsen <rockdaboot>
Project Administrator
Tue 06 Nov 2018 09:04:25 AM UTC, comment #2: 

robots.txt is an exception regarding 416 responses. It will always be fully retrieved (have to find the reason in the ML archives yet).

Try the same with
`wget -d -c -t 1 https://brage.info/wget-bug.txt`
and you'll see

"The file is already fully retrieved; nothing to do."

But this exception seems not to be documented... I leave this open until the docs have been updated.

Thanks for the report.

Tim Ruehsen <rockdaboot>
Project Administrator
Mon 05 Nov 2018 03:59:38 PM UTC, comment #1: 

To clarify: This specific 416 should be treated as success, not every 416 issued for a range request. Specifically, the HTTP return includes the size of the file on disk, matching the size wget knows it already has.

Svein Ove Aas <baughn>
Mon 05 Nov 2018 03:39:50 PM UTC, original submission:  

This was tested on NixOS 19.03pre-git (Koi), based on a report from a user on Windows.

With wget -c, the client issues a range request asking for any data that has not yet been downloaded. For a file that has already been fully downloaded this becomes an invalid request, asking for data that does not exist, and the HTTP server should return a 416.

In wget 1.18, the 416 return is correctly treated as success.

For wget 1.19.5, this is treated as an error, and the download is retried. It should be treated as success.

Example, for `wget -d -c -t 1 https://brage.info/robots.txt`: https://brage.info/wget-bug.txt

Svein Ove Aas <baughn>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by baughn (Submitted the item)




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-09 rockdaboot Open/ClosedOpen Closed
        Release1.19.5 1.19.2
        Planned ReleaseNone 1.19.6
    2018-11-06 rockdaboot StatusNone Confirmed
    2018-11-06 rockdaboot Assigned toNone rockdaboot

    Back to the top

    Powered by Savane 3.9