chiark / gitweb /
Reorder the gitlab mirrors so GitLab Pages comes before "raw".
authorPeter Serwylo <peter@serwylo.com>
Wed, 17 Jan 2018 21:02:07 +0000 (08:02 +1100)
committerPeter Serwylo <peter@serwylo.com>
Wed, 17 Jan 2018 21:02:07 +0000 (08:02 +1100)
commit3180acc454a0a70dc8b2829f24133c68c686ca62
treec0292e1cd8fe857a354a786d157af2aa8618ee7b
parent56a53055bef857d7cf0f76eb7b485a2f6e85ac2a
Reorder the gitlab mirrors so GitLab Pages comes before "raw".

GitLab storage provides two mirrors by default:
 * https://gitlab.com/user/repo/raw/master/fdroid/repo
 * https://user.gitlab.io/repo/fdroid/repo

While the F-Droid client will happily fetch the index*.jar files and
parse them from either of these two mirrors, only the GitLab Pages
mirror will serve files with the correct mime type. Many repos
tend to put index.html files (and associated .css/.js/image files) in
the root of a repository to provide information about that repo.

One example is RepoMaker. The way in which RepoMaker decides the public
URL of a repo, is to take the first mirror in the list. This means that
the URL which RepoMaker directs people to for GitLab storage returns a
.html document in text/plain, which means that it is not rendered.

We could change RepoMaker so that it takes the last mirror, and then it
woruld work. However there is something nice about the first mirror in a
list being the most authoritative (even though the mirror order doesn't
- and perhaps shouldn't have any specific meaning).
fdroidserver/index.py