[Yum-devel] [PATCH] implement reget=check_timestamp
Zdenek Pavlas
zpavlas at redhat.com
Tue Jun 26 08:54:24 UTC 2012
> Ok, so what is the desire for both cases here. Above that we say:
>
> reget = None [None|'simple'|'check_timestamp']
>
> whether to attempt to reget a partially-downloaded file. Reget
> only applies to .urlgrab and (obviously) only if there is a
> partially downloaded file. Reget has two modes:
>
> ...which implies this is getting extra data or all data, the above
> kind of implies we are getting extra data or nothing (or maybe all data or
> nothing). But there is a also a problem with the idea...
Yes, the idea is to use reget=simple when we have unique URLs,
and reget=check_timestamp for URLs where content changes over time.
> This timestamp is going to be one of three things:
>
> 1. The timestamp we last tried to download FOO, and stopped before we
> got it all.
>
> 2. The timestamp we last downloaded all of FOO, but didn't have a
> last-modified.
>
> 3. The timestamp of the server last-modified when we last downloaded
> all of FOO and had a last-modified so urlgrabber used utimes().
>
> ...which is problematic.
1. This implies timestamp check fails for every partially downloaded
file. That's why I ignore opts.range unless reget==simple.
2. We'd always reget the whole file (it's a special case of 1).
3. Yes, I rely on utime() being used on completed files only.
Why is that problematic?
> > + 'If-Modified-Since: %a, %d %b %Y %H:%M:%S
> This should be If-Range IMO.
If-Range should be used together with a Range header.
Because of 1) we can't use ranges, it's all or nothing.
More information about the Yum-devel
mailing list