diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java index 5c124f79b839a246410268d7665add5c2a8b4a4d..78e319b552279aa9ea5381cd9e5a7ae32174583c 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java @@ -46,7 +46,7 @@ public class DataStoreApiUrlUtilities public static String getDataStoreUrlFromServerUrl(String dataStoreServerUrl) { String datastoreUrl = dataStoreServerUrl; - + // The url objained form a DataStore object is the *download* url. Convert this to the // datastore URL if (datastoreUrl.endsWith("/")) @@ -54,6 +54,11 @@ public class DataStoreApiUrlUtilities datastoreUrl = datastoreUrl.substring(0, datastoreUrl.length() - 1); } + if (false == datastoreUrl.endsWith(DATA_STORE_SERVER_WEB_APPLICATION_NAME)) + { + datastoreUrl = datastoreUrl + "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME; + } + return datastoreUrl; }