bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH v4] Make wget capable of starting download from a


From: Yousong Zhou
Subject: Re: [Bug-wget] [PATCH v4] Make wget capable of starting download from a specified position.
Date: Thu, 13 Feb 2014 11:32:24 +0800

On 6 February 2014 22:50, Tim Ruehsen <address@hidden> wrote:
>> I thought ENDPOS was in the patch and once I did a quick look at it I know
>> why I decided it should be --start-pos, without LEN or ENDPOS.
>>
>>  - I thought the current implementation is simple, neat and easy.  Several
>> lines of code really help at that time.
>>  - Code of wget is old and mature enough, mimicing curl's --range is very
>> likely to pose many compatibility and maintainance issues.  This is not
>> what we want.
>>  - I actually thought about LENGTH, but not ENDPOS and the main reason I
>> give myself to not implement it is that we can achieve length limit with
>> other utilities, e.g. dd.
>>
>> So I do not have intention to implement curl-like --range option in wget.
>
> I understand that and agreed with you.
> For me, there is just this little documentation issue that I mentioned (here
> is my imperfect suggestion)
>
> Start downloading at zero-based position @var{OFFSET}.  Offset may be
> expressed in bytes, kilobytes with the `k' suffix, or megabytes with the `m'
> suffix.
>
> If combined with @samp{--continue} and the destination file exists, the
> downloaded data will be appended. To avoid appending, you may explicitly
> specify an output filename with @samp{-O FILE}.
>
> Server support for the 'Range' header is needed, otherwise @samp{--start-pos}
> cannot help.  See @samp{-c} for details.
>

Thank you, Tim.  I appreciate your help and suggestion.  Just got my
internet connection back, sorry for the delayed response.

I will try to review and enhance my implementation then send a new patch.

 - Forbid the presence of both `--start-pos` and `--continue` which
makes little sense.
 - Zero-based offset position is fine at first glance, but not
appropriate when used as a bool value, i.e. `if(opt.start_pos) ...`.
I will try to polish the current zero-based solution, but may change
it to 1 based if there is not acceptable workaround.
 - Add test cases for the new feature.


Best regards.


               yousong



reply via email to

[Prev in Thread] Current Thread [Next in Thread]