Sun 09 Sep 2007 06:19:08 PM UTC, comment #4:
let see if i can be more specific, when you start for the first time a download ( ex: wget -c -S http://gaming.ngi.it/test.zip )
you're receiving from the server this header :
---
--19:59:53-- http://gaming.ngi.it/test.zip
Resolving gaming.ngi.it... 88.149.128.30
Connecting to gaming.ngi.it|88.149.128.30|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Sun, 09 Sep 2007 18:00:08 GMT
Server: Apache
Last-Modified: Sun, 04 Sep 2005 07:51:10 GMT
ETag: "9197461-6400000-75463780"
Accept-Ranges: bytes
Content-Length: 104857600
Connection: close
Content-Type: application/zip
Length: 104857600 (100M) [application/zip]
Saving to: `test.zip'
3% [> ] 3,613,764 36.3K/s eta 70m 50s
---
you see in this header contain the field "Content-Length:" who it's been used bye wget to draw and calculate the gauge and eta on the bottom.
when wget go in timeout, or connection is resetted, or other, wget do a retry of that file, but this time instead to re download from the beginning he do a partial content retrieve, so this time you obtain an header like this :
---
20:05:43 (47.6 KB/s) - Read error at byte 1118109/104857600 (Connection reset by
peer). Retrying.
--20:05:43-- (try: 2) http://gaming.ngi.it/test.zip
Connecting to gaming.ngi.it|88.149.128.30|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 206 Partial Content
Date: Sun, 09 Sep 2007 18:05:59 GMT
Server: Apache
Last-Modified: Sun, 04 Sep 2005 07:51:10 GMT
ETag: "9197461-6400000-75463780"
Accept-Ranges: bytes
Content-Length: 103739491
Content-Range: bytes 1118109-104857599/104857600
Connection: close
Content-Type: application/zip
Length: 104857600 (100M), 103739491 (99M) remaining [application/zip]
Saving to: `test.zip'
1% [ ] 1,360,155 25.1K/s eta 80m 36s^
---
you see now in this header you found the "Content-Length:" field and the "Content-Range:" field, now wget on this server and on this partial content retrieve it's not bug because he find the "Content-Length:" field who he use to calculate gauge and eta.
BUT on some server like "http://www.rfactorcentral.com" the HTTP server on a partial content retrieve do not insert in the header the "Content-Length:" field, making wget incapable to draw the correct gauge and eta, and making him DUMP on the end of the connection trying to calculate the average bandwidth and time spent in download ( i think on a division bye 0 ).
so to avoid this and to make wget behave better on this problem is possible to use the 3th value of the "Content-Range:" field who is the same value and think of the "Content-Length:" field, fixing the problem raised bye a server who don't send the "Content-Length:" field on a partial content retrieval header message 206.
now you understand better this ?
|