Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option that tries to grab etag to check for new version instead of date #2221

Closed
Vityacv opened this issue Apr 2, 2025 · 3 comments
Closed
Labels
enhancement New feature or request source-specific This bug/feature affects a specific source

Comments

@Vityacv
Copy link

Vityacv commented Apr 2, 2025

If I try to use Direct APK link, every time I refresh it, it gives me new "version" (timestamp). Maybe it's possible to try to use etag instead if server supports it?
You could check it with curl like this:
curl -I 'https://example.com/app.apk'
It could return sometihng like this

HTTP/2 200 
server: nginx
date: xxx
content-type: application/vnd.android.package-archive; charset=UTF-8
content-length: xxx
last-modified: xxx
etag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
x-amz-request-id: xxx
cache: HIT
x-cached-since: 1970-01-01
accept-ranges: bytes

Thanks!

@Vityacv Vityacv added enhancement New feature or request to check Issue has not been reviewed labels Apr 2, 2025
@ImranR98 ImranR98 added source-specific This bug/feature affects a specific source and removed to check Issue has not been reviewed labels Apr 5, 2025
@ImranR98
Copy link
Owner

ImranR98 commented Apr 5, 2025

Could you give me a real link that has an etag I can use to test with?

@ImranR98 ImranR98 added the TODO Issue to focus on for the next release label Apr 5, 2025
@Vityacv
Copy link
Author

Vityacv commented Apr 5, 2025

Could try for example
curl -I https://telegram.org/dl/android/apk
It will return redirect url that you'll need to use for next query:
curl -I https://cdn4.cdn-telegram.org/file/Telegram.apk
which returns for me

HTTP/2 200 
server: nginx/1.18.0
content-disposition: attachment; filename="Telegram.apk"
accept-ranges: bytes
etag: "98302836a2bac183b01c0b10cbd4ef0a4494dd9e"
content-type: application/octet-stream
...

ImranR98 added a commit that referenced this issue Apr 6, 2025
- Ensure headers are still sent when URL request is redirected (#1973)
- Add 'ETag header' option for HTML and direct APK links (#2221)
- Ensure links on add app page do not overlap/merge (#2216)
@ImranR98
Copy link
Owner

ImranR98 commented Apr 6, 2025

@ImranR98 ImranR98 closed this as completed Apr 6, 2025
@ImranR98 ImranR98 removed the TODO Issue to focus on for the next release label Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request source-specific This bug/feature affects a specific source
Projects
None yet
Development

No branches or pull requests

2 participants