chiark / gitweb /
sanitize mirror URLs to prevent path segments from being removed
authorHans-Christoph Steiner <hans@eds.org>
Tue, 23 Aug 2016 14:20:52 +0000 (16:20 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 24 Aug 2016 21:05:34 +0000 (23:05 +0200)
commita6a8d345283c98112a26b9fad67efa0df947ec73
tree46bb1f964c767c121d539edf24fa25510ae8496d
parent1c49c3af1d8db7317b8fe0f1743882396d2aaf6e
sanitize mirror URLs to prevent path segments from being removed

urllib.parse.urljoin() will strip off the last path segment before joining
if that last path segment does not end with /.  That's a "feature" to make
it easy to replace file names.  Here it was stripping off the essential
'fdroid' segment, making URLs like:

https://foo.com/repo

when they should be

https://foo.com/fdroid/repo
fdroidserver/update.py