keeleysam-recipes icon indicating copy to clipboard operation
keeleysam-recipes copied to clipboard

Winclone recipe downloads a fresh copy each time

Open flammable opened this issue 10 years ago • 4 comments

Hey Sam!

The Winclone recipe downloads a fresh copy each time it's run. I asked about this in IRC, and Tim Sutton / Greg Neagle tracked it down to a server issue on Twocanoes' end (it gives a unique ETag on every hit).

Any ideas? I'm going to run the recipe manually (and remove it from the rotation, so it doesn't trigger AutoPkgr emails), but it'd be ideal if I could run this alongside the other recipes.

Thanks!

Mike

flammable avatar Feb 18 '15 23:02 flammable

@tperfitt ping!

keeleysam avatar Feb 18 '15 23:02 keeleysam

It looks like the headers for the download URL don't have any info autopkg could use to tell that it already downloaded the item: no modification date, no content-length, no Etag.

gregneagle avatar Feb 19 '15 00:02 gregneagle

looking into it. Can the etag just be a sha1 hash of the resource?

tperfitt avatar Feb 19 '15 02:02 tperfitt

@tperfitt ETags are properly set elsewhere on twocanoes.com, it is just anything under https://www.twocanoes.com/winclone/updates/ which doesn't have them. Looks like a Phusion Passenger + nginx issue.

curl -A "Winclone Pro/4.1 Sparkle/313" -I https://www.twocanoes.com/winclone/
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: text/html; charset=utf-8
Date: Thu, 19 Feb 2015 05:03:02 GMT
ETag: "483287d73cb0e435ca960abf539700b0"
Server: nginx/1.2.3 + Phusion Passenger 3.0.17 (mod_rails/mod_rack)
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17
X-Rack-Cache: miss
X-Request-Id: a62bfafd4a7ac8c46d10cfcf89220662
X-Runtime: 0.278493
X-UA-Compatible: IE=Edge,chrome=1
Connection: keep-alive

versus

curl -A "Winclone Pro/4.1 Sparkle/313" -I https://www.twocanoes.com/winclone/updates/winclone4-pro-software-updates.xml
HTTP/1.1 200 OK
Cache-Control: private
Content-Disposition: attachment; filename="winclone4-pro-software-updates.xml"
Content-Transfer-Encoding: binary
Content-Type: application/xml
Date: Thu, 19 Feb 2015 05:02:23 GMT
Server: nginx/1.2.3 + Phusion Passenger 3.0.17 (mod_rails/mod_rack)
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17
X-Rack-Cache: miss
X-Request-Id: e3b88874b9153ad917e058f11e8b050a
X-Runtime: 0.028395
X-UA-Compatible: IE=Edge,chrome=1
Connection: keep-alive

keeleysam avatar Feb 19 '15 05:02 keeleysam