Skip to content

Commit 9a8bc27

Browse files
committed
Support also https
1 parent 755c28b commit 9a8bc27

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

org.bridgedb/src/main/java/org/bridgedb/DataSource.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -969,10 +969,10 @@ public static DataSource getByMiriamBase(String base)
969969
* @return the DataSource for a given base, or null if the base is invalid or unknown.
970970
*/
971971
public static DataSource getByIdentiferOrgBase(String base) {
972-
if (base == null || !base.startsWith (IDENTIFIERS_ORG_PREFIX))
973-
{
974-
return null;
975-
}
972+
if (base == null) return null;
973+
// support the HTTPS variant too
974+
base = base.replace("https://identifiers.org", "http://identifiers.org");
975+
if (!base.startsWith (IDENTIFIERS_ORG_PREFIX)) return null;
976976

977977
String key = base.substring(IDENTIFIERS_ORG_PREFIX.length());
978978
if (key.endsWith("/")){

0 commit comments

Comments
 (0)