-
Notifications
You must be signed in to change notification settings - Fork 37
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
Playmaker doesn't update etag; therefore Fdroid thinks no repo update available #20
Comments
Looking at http://www.tornadoweb.org/en/stable/_modules/tornado/web.html#RequestHandler.compute_etag, we can clearly see why it doesn't return anything useful. Apache (see https://httpd.apache.org/docs/2.4/de/mod/core.html#fileetag) uses
to calculate the etag. I just tried using apache to serve the repo, it worked without issues. To fix this in playmaker, we should definitely use the modified datetime and size to calculate the etag. (I wouldn't use the inode to ensure persistent etags between docker deploys) |
Thanks for reporting, I never noticed this problem. Need to check if there's a way in RequestHandler to get the filepath which is currently being served through tornado, so that we could use [1] and [2] [1] https://docs.python.org/3/library/os.path.html#os.path.getmtime |
@NoMore201 Look at this: https://gist.github.com/andreadipersio/7526464#file-tornado-disable-auto-etag-py-L12 |
I can report this problem too. Thanks for fixing. |
@NoMore201 Any updates on this? :) |
A manual workaround in f-droid: disabling and re-enabling the repository in f-droid seems to force a refresh. This kind of defeats the purpose of automatic updates, but at least it is still possible to update apps. |
Also, when using a reverse proxy, it can be configured to hide the ETag, e.g. for nginx:
|
@apexo I don't think that's useful, as fdroid will re-download the repo list every time, as it thinks it has changed. |
It's not a perfect solution, but at least you'll get updates. |
Hey @NoMore201, have you abandoned this project? :-( |
I just had an idea for an workaround (if you are using nginx in front of playmaker on the docker host) As the fdroid repo is just tornado serving the location /fdroid {
alias /srv/fdroid/repo/;
} |
Hi,
I had the problem of the fdroid app keeping the same "last updated" date for my playmaker repository (and also not providing new app versions).
I debugged this and found the reason.
These are the headers returned by the playmaker repo when requesting
index-v1.jar
before updating the repo:Now I updated the repo and got these headers returned:
You can clearly see that the
last-modified
header is updated correctly, but the etag stays the same.This is a huge issue, as fdroid uses the etag to determine whether a repository needs to be updated or not: https://gitlab.com/fdroid/fdroidclient/blob/master/app/src/main/java/org/fdroid/fdroid/net/HttpDownloader.java#L95
The text was updated successfully, but these errors were encountered: