[quote=“akbooer, post:1, topic:191608”] I was revisiting this just yesterday and am totally confounded by the HTTP redirect which GitHub does in order to access the latest release (or any, in fact.)
If anyone can point me in the right direction for successfully downloading a tagged release, then I am all ears. I am loathe to do this with a UNIX command wget or curl, since I want it to work on Windows too. The LuaSocket library seems incapable of handling this and I’ve had no luck stripping out the redirect information from the returned header manually.[/quote]
Definitely should be internal to openLuup IMO as opposed to calling something like wget or curl.
Do you mean the 302?
If so, can’t you just use the “result” of the 302?
I don’t know why they do a 302, it’s always redirected to the same url for as long as I can remember.
[code]
root@ahsoxu41:~# wget https://github.com/akbooer/openLuup/archive/v0.7.0.tar.gz
–2016-03-14 22:52:44-- https://github.com/akbooer/openLuup/archive/v0.7.0.tar.gz
Resolving github.com (github.com)… 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/akbooer/openLuup/tar.gz/v0.7.0 [following]
–2016-03-14 22:52:45-- https://codeload.github.com/akbooer/openLuup/tar.gz/v0.7.0
Resolving codeload.github.com (codeload.github.com)… 192.30.252.163
Connecting to codeload.github.com (codeload.github.com)|192.30.252.163|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 306836 (300K) [application/x-gzip]
Saving to: ‘v0.7.0.tar.gz’
v0.7.0.tar.gz 100%[===========================================================================================================>] 299.64K 450KB/s in 0.7s
2016-03-14 22:52:46 (450 KB/s) - ‘v0.7.0.tar.gz’ saved [306836/306836]
root@ahsoxu41:~# wget https://codeload.github.com/akbooer/openLuup/tar.gz/v0.7.0
–2016-03-14 22:53:51-- https://codeload.github.com/akbooer/openLuup/tar.gz/v0.7.0
Resolving codeload.github.com (codeload.github.com)… 192.30.252.160
Connecting to codeload.github.com (codeload.github.com)|192.30.252.160|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 306836 (300K) [application/x-gzip]
Saving to: ‘v0.7.0’
v0.7.0 100%[===========================================================================================================>] 299.64K 479KB/s in 0.6s
2016-03-14 22:53:52 (479 KB/s) - ‘v0.7.0’ saved [306836/306836]
root@ahsoxu41:~# wget https://github.com/akbooer/openLuup/archive/master.zip
–2016-03-14 22:55:01-- https://github.com/akbooer/openLuup/archive/master.zip
Resolving github.com (github.com)… 192.30.252.131
Connecting to github.com (github.com)|192.30.252.131|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/akbooer/openLuup/zip/master [following]
–2016-03-14 22:55:02-- https://codeload.github.com/akbooer/openLuup/zip/master
Resolving codeload.github.com (codeload.github.com)… 192.30.252.162
Connecting to codeload.github.com (codeload.github.com)|192.30.252.162|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’
master.zip [ <=> ] 321.82K 570KB/s in 0.6s
2016-03-14 22:55:03 (570 KB/s) - ‘master.zip’ saved [329539]
root@ahsoxu41:~# wget https://codeload.github.com/akbooer/openLuup/zip/master
–2016-03-14 22:55:20-- https://codeload.github.com/akbooer/openLuup/zip/master
Resolving codeload.github.com (codeload.github.com)… 192.30.252.162
Connecting to codeload.github.com (codeload.github.com)|192.30.252.162|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 329539 (322K) [application/zip]
Saving to: ‘master’
master 100%[===========================================================================================================>] 321.82K 418KB/s in 0.8s
2016-03-14 22:55:21 (418 KB/s) - ‘master’ saved [329539/329539][/code]