bugGNU Wget - Bugs: bug #20416, wget needs a way to request a...


bug #20416: wget needs a way to request a range of bytes (--range option?)

Submitted by:  Noël Köthe <nok>
Submitted on:  Mon Jul 9 20:48:49 2007  
Category: Feature RequestSeverity: 2 - Minor
Priority: 4Status: Needs Discussion
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: 1.10.2Operating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: 1.14Regression: Yes
Work Required: NonePatch Included: Yes

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Tue Oct 16 11:10:11 2012, comment #6:

Are there any news on this bug? The link to patch in comment #3 doesn't work.


Tomas Hozza <thozza>
Fri Sep 24 17:28:50 2010, comment #5:


Thu Nov 13 02:53:02 2008, comment #4:

Additional suggestions, including a "--replace-range" option, at http://article.gmane.org/gmane.comp.web.wget.general/8421

Micah Cowan <micahcowan>
Project Administrator
Wed Oct 22 16:10:14 2008, comment #3:

Patch for this at http://article.gmane.org/gmane.comp.web.wget.patches/2468

Tentatively retargetting for 1.12.

Micah Cowan <micahcowan>
Project Administrator
Fri Sep 19 13:25:34 2008, comment #2:


this bug #20416 can be fixed in this way:

$ cd wget-1.11.4/src
$ diff http.c http.c.bak
< if ((contrange != 0 && contrange != hs->restval && hs->restval != 0 )

> if ((contrange != 0 && contrange != hs->restval)


Mon Jul 9 20:59:08 2007, comment #1:

I don't think that wget should be expected to handle a 206 response that it wasn't expecting (wget doesn't "know" it specified a Range header). A better way to do this would be to offer a --range option, and handle that. This has actually already been requested (but no bug report existed for it yet). Some further discussion will need to take place, though, as to how to handle this in certain situations (for instance, if we're using -c and the file already exists, should it "rewrite" the applicable portion of the existing file?).

I'm rewriting the summary from "wget doesn't try to read 206/partial content response", to address the core need.

Noèl: FYI, the Code Architecture category is actually intended to apply to code design/structure rather than to any functional changes.

Micah Cowan <micahcowan>
Project Administrator
Mon Jul 9 20:48:49 2007, original submission:


a forwarded bug report from http://bugs.debian.org/335777

"When I add a byte-range header to a wget request, wget doesn't seem to
try to read the response body from the server, and thinks it should

wget -O /dev/null -S --header="Range: bytes=0-100" http://www.debian.org/

HTTP request sent, awaiting response...
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-Length: 101
Content-Range: bytes 0-100/14366
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Language: en

(setting retries to 1 it still fails to read the response).

The wget in stable 1.9.1-12 reads the response body in the case of the 206 as expected."



Noël Köthe <nok>


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

Attach File(s):

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 thozza (Posted a comment)
  • -unavailable- added by micahcowan (Posted a comment)
  • -unavailable- added by nok (Submitted the item)

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



    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jun 11 19:56:12 2009micahcowanPlanned Release1.12=>1.14
    Tue Nov 4 01:37:26 2008micahcowanPriority5 - Normal=>4
    Wed Oct 22 16:10:14 2008micahcowanPlanned Release1.14=>1.12
      Patch IncludedNone=>Yes
    Thu Aug 21 23:38:49 2008micahcowanPlanned Release1.15=>1.14
    Fri Jul 20 08:03:00 2007micahcowanStatusNone=>Needs Discussion
    Fri Jul 20 05:26:11 2007micahcowanCategoryNone=>Feature Request
      Severity3 - Normal=>2 - Minor
      Planned ReleaseNone=>1.15
    Mon Jul 9 20:59:08 2007micahcowanCategoryCode Architecture=>None
      Summarywget doesn\'t try to read 206/partial content response=>wget needs a way to request a range of bytes (--range option?)

    Back to the top

    Powered by Savane 3.1-cleanup1