bugGNU Wget - Bugs: bug #51840, Local file corruption using...

 
 

bug #51840: Local file corruption using default retry mechanism when retry returns no data

Submitted by:  None
Submitted on:  Thu 24 Aug 2017 03:13:30 PM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: Andrew CaruthOriginator Email: -unavailable-
Open/Closed: OpenRelease: 1.18
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: NonePlanned 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 24 Aug 2017 03:13:30 PM UTC, original submission:

The following server behaviour results in a corrupt local download:

1: Accept TCP connection from wget
2: Return all of the HTTP response header and N bytes of the content
3: Close the connection
(wget retry attempt 1 begins from offset N using the range header)
4: Accept TCP connection from wget
5: Close the connection
(wget retry attempt 2 begins with no byte range)
6: Return all of the HTTP response header and all of the content
7: Close the connection

The local file will now contain the bytes received in step 2 as well as all of the bytes received in step 6.

I believe that if a 'ranged' retry receives no data, further retries should continue to make ranged requests. Alternatively the offset in the partial file should be reset to 0 so the next non-ranged request starts from the correct place.

I've attached a tcpdump capture and wget debug output. The file requested is 12 bytes ("hello world!") and the resulting file is 17 bytes ("hellohello world!").

I have also reproduced this with wget 1.13.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #41642:  wget118_corruption.pcap added by None (3KiB - application/octet-stream)
file #41643:  wget_debug.log added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (Submitted the item)
  •  

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Aug 2017 03:13:30 PM UTCNoneAttached File-=>Added wget118_corruption.pcap, #41642
      Attached File-=>Added wget_debug.log, #41643

    Back to the top


    Powered by Savane 3.1-cleanup1