Re: -c question

2001-03-31 Thread Hrvoje Niksic

"Dan Harkless" [EMAIL PROTECTED] writes:

 Vladi Belperchinov-Shabanski [EMAIL PROTECTED] writes:
   Yes, it's a known bug and is documented in the current CVS version of
   wget.texi.  With luck, the fix may be as simple as changing a = to a .
   It's just that no one's had a chance to look at it.  Feel free to peruse
   the source and send us a patch.
  
As far as I can understand the problem is that http server does
not return Content-Range header if requested range starts at the
end of the file (note that this problem is just for http connections
ftp is fine). Unfortunately wget code is still not very clear to me
and I'm a bit afraid to touch it :) anyway I'll write few notes, so
if anyone that is aware could fix it perhaps...
  
http.c:1008: Content-Range header never found and so
 contrange stays at -1
  
http.c:1126: contrange is still -1 so hs-restval is reset to 0
 if I get it correctly here is the place that code
 should be fixed...
  
if hs-restval is requested and is equal to file size so either
procedure should be canceled or continued as there are 0 bytes
left...
  
currently I cannot do more than this, I'm sorry.

I think I've got this fixed now.  The patch I'll submit also fixes
this TODO entry:

* If -c used on a file that's already completely downloaded, don't re-download
  it (unless normal --timestamping processing would cause you to do so).

Except I'm not sure it handles timestamping the way this TODO entry
would like to.



Re: -c question

2001-03-06 Thread Dan Harkless


Vladi Belperchinov-Shabanski [EMAIL PROTECTED] writes:
 hi!
 
   `wget -c file'
 
   starts to download file from the begining if the file
   is completely downloaded already...
 
   why?!
 
   I expect wget to do nothing in this case: I wanted it
   to download file to the end (i.e. to continue, -c) and
   if the file is already here so there is nothing to do.
 
   There is nothing for this case in the man so I'd like
   to know is there explanation for this behaviour, otherwise
   I think it should be considered `a bug'.

Yes, it's a known bug and is documented in the current CVS version of
wget.texi.  With luck, the fix may be as simple as changing a = to a .
It's just that no one's had a chance to look at it.  Feel free to peruse the
source and send us a patch.

---
Dan Harkless| To help prevent SPAM contamination,
GNU Wget co-maintainer  | please do not mention this email
http://sunsite.dk/wget/ | address in Usenet posts -- thank you.