Skip to content
Snippets Groups Projects
Commit f2666448 authored by cramakri's avatar cramakri
Browse files

MINOR: More robust handling of URLs.

SVN: 16539
parent 06381158
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ public class DataStoreApiUrlUtilities ...@@ -46,7 +46,7 @@ public class DataStoreApiUrlUtilities
public static String getDataStoreUrlFromServerUrl(String dataStoreServerUrl) public static String getDataStoreUrlFromServerUrl(String dataStoreServerUrl)
{ {
String datastoreUrl = dataStoreServerUrl; String datastoreUrl = dataStoreServerUrl;
// The url objained form a DataStore object is the *download* url. Convert this to the // The url objained form a DataStore object is the *download* url. Convert this to the
// datastore URL // datastore URL
if (datastoreUrl.endsWith("/")) if (datastoreUrl.endsWith("/"))
...@@ -54,6 +54,11 @@ public class DataStoreApiUrlUtilities ...@@ -54,6 +54,11 @@ public class DataStoreApiUrlUtilities
datastoreUrl = datastoreUrl.substring(0, datastoreUrl.length() - 1); 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; return datastoreUrl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment