> I note there is an option to set if-modified-since as well a to get
> a cache-freshness value in getting back a response, but the cachefreshness
> value seems to always return 1, as it is the number of seconds
> old since the item was retrieved.

Using if-modified-since relies on the server you're querying supporting that - 
but if you do use it you set If-Modified-Since (see: 
https://tools.ietf.org/html/rfc7232#section-3.3) and if you receive a HTTP 304 
Not Modified the remote object was not newer than your requested date (see: 
https://tools.ietf.org/html/rfc7232#section-4.1).

> Anyone know the call/header value to use for getting at the remote
> object's last-modified time directly?

You can check what headers are available by using a HEAD request before you GET 
- then you can make the call to download or not.

Cheerio,

 Brad


On Tue, 22 Oct 2019 11:08 +11:00, L A Walsh <ast...@tlinx.org> wrote:
> I'm downloading packages for my distro into a cache area on my local
> system.
> 
> I note there is an option to set if-modified-since as well a to get
> a cache-freshness value in getting back a response, but the cachefreshness
> value seems to always return 1, as it is the number of seconds
> old since the item was retrieved.
> 
> Thing it, I'd like to get the time& date stamp on the remote item.
> 
> Is there some header value that contains the time (in epoch seconds)
> for the remote item?
> 
> I am also familiar with a variant of the 'GET' method -- 'mirror' which
> will set the value of my copy to that on the remote -- so something
> must have the actual time stamp of the remote object.
> 
> I'm just not sure what call or interface I need to use to get at
> it directly.
> 
> While the 'mirror' option might be good in the long term, until I'm
> sure all my bits and pieces fit together I'd like to be able to
> display the local and remote time stamps on the object.
> 
> Anyone know the call/header value to use for getting at the remote
> object's last-modified time directly?
> 
> Thanks!
>

-- 
Bradley Dean
Email: bjd...@bjdean.id.au Skype: sk...@bjdean.id.au
Mobile(Aus): +61-413014395 WWW: http://bjdean.id.au/

Reply via email to