Use the last-modified
response header as a pseudo-version if available
#1821
Labels
enhancement
New feature or request
The change I propose is related to the pseudo-version generation, whenever a pseudo-version is used to tell whether an APK got an update.
The change does not lead to any breakage of existing user configs or operations. Neither does it require removing nor disabling any existing features of Obtanium.
To be clear, by the header I mean what I see when I run
curl -I <URL>
or a similar app.If I get it right, the header is quite standard. And surely enough, if a server tells it once, it will send it every time. So, when a user adds an app to Obtanium, the latter can check what the server tells.
For instance,
https://github.com/ImranR98/Obtainium/releases/download/v1.1.20/app-release.apk
returns code302
and a new location. There, nolast-modified
is present. If I follow the location, I'll get the response code200
andlast-modified: Tue, 20 Aug 2024 03:14:30 GMT
. The release occurred on2024-08-20T03:14:23Z
. So, the value looks reliable.I propose the following behavior.
First, conditions:
Now, the actual roadmap.
last-modified
response header among the headers the server sends back.Rationale 1.
Using human-readable dates might improve the UX. Furthermore, the
last-modified
response header might actually show how long ago an app was updated on a server.Rationale 2.
Consider this URL:
https://alfamobile-web.servicecdn.ru/latest/alfa-bank.apk
.The server responds
200
, i.e., the APK is right there.However, in Obtanium, it turns out that the pseudo-version takes one of three numeric values at random. The value changes whenever I overscroll the app page in Obtanium to refresh the data. This causes the APK to be re-installed over and over almost every time Obtanium checks for updates. It's not an issue in Obtanium.
To reproduce:
https://alfamobile-web.servicecdn.ru/latest/alfa-bank.apk
, override the source to read Direct APK Link.How it looks:
screen.mp4
The text was updated successfully, but these errors were encountered: