Resolution of SWH-IDs fails with 404 if there is a trailing slash in the origin field, followed by a semicolon, as in the following
while it works if we swap the parameters, as in the following
Resolution of SWH-IDs fails with 404 if there is a trailing slash in the origin field, followed by a semicolon, as in the following
while it works if we swap the parameters, as in the following
That's because all origin urls coming from Github are stored without a trailing slash in our database.
The following url is valid for instance: https://archive.softwareheritage.org/swh:1:cnt:c60366bc03936eede6509b23307321faf1035e23;origin=https://github.com/sagemath/sage;lines=473-537
However, I agree this is really confusing and a similar issue has already been reported (T1852, but this time it is about origin urls with trailing slashes).
I will find a way to workaround this.
What about try to resolve the origin url as it is, and in case of failure
retry without trailing slash?
Roberto
Le mar. 18 févr. 2020 à 11:57, anlambert (Antoine Lambert) <
forge@softwareheritage.org> a écrit :
anlambert added a comment. View Task
https://forge.softwareheritage.org/T2289That's because all origin urls coming from Github are stored without a
trailing slash in our database.The following url is valid for instance:
https://archive.softwareheritage.org/swh:1:cnt:c60366bc03936eede6509b23307321faf1035e23;origin=https://github.com/sagemath/sage;lines=473-537However, I agree this is really confusing and a similar issue has already
been reported (T1852 https://forge.softwareheritage.org/T1852, but this
time it is about origin urls with trailing slashes).I will find a way to workaround this.
*TASK DETAIL*
https://forge.softwareheritage.org/T2289*EMAIL PREFERENCES*
https://forge.softwareheritage.org/settings/panel/emailpreferences/*To: *anlambert
*Cc: *zack, moranegg, rdicosmo, Iamshankhadeep, shisus, anlambert
What about try to resolve the origin url as it is, and in case of failure
retry without trailing slash?
This is exactly what I will implement. I will also handle the case when the trailing slash is missing (for debian origins).