PDA

View Full Version : Version check of remote file prior to Download



meercat
05-28-2013, 11:36 PM
Hi,

Is it possible to perform a version check of a HTTP hosted file prior to downloading it?

With the "Install File" function, support is provided for version checking.

With the "Download File" function, there doesn't seem to be.

I can imagine that this has something to do with what's provided by the hosting operating system but if there is some way to work around it, I would appreciate knowing.

Thanks in advance,
Alex

linder
05-29-2013, 12:09 AM
Alex,

How would you do this without SetupBuilder ;-)

No, you can't do this. And you are right -- a HTTP server does not support this kind of functionality.

Friedrich

meercat
05-30-2013, 02:14 AM
Hi Friedrich,

I believe that a HTTP HEAD request instead of a HTTP GET request would read the HTTP headers only.

From there, according to the W3 Standard...


the Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified.

Last-Modified = "Last-Modified" ":" HTTP-date
An example of its use is

Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the most recent of the set of last-modify times for its component parts. For database gateways, it may be the last-update time stamp of the record. For virtual objects, it may be the last time the internal state changed.

It seems like this would do the trick.

Could it be done from within SetupBuilder?

Regards,
Alex

linder
05-30-2013, 02:56 AM
Alex,

This can't help in any way because you need a function to read the version resource from the PE header file ;) To get access to the version resource, you have to download the whole file and then read the version resource.

Friedrich