From 3922709663fbc0872c04f67fc96aa70480f9e07b Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 24 Jul 2009 18:28:53 +0000 Subject: [PATCH] CSPACE-333: Fixed by checking to see if the 'URL_PROPERTY' prop was set. If so, then we ignore the SSL check. --- .../services/client/CollectionSpaceClient.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java b/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java index af6f4b37e..940568903 100644 --- a/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java +++ b/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java @@ -35,9 +35,9 @@ public abstract class CollectionSpaceClient { protected CollectionSpaceClient() { - String url = System.getProperty(URL_PROPERTY, DEFAULT_URL); - if(url != null){ - baseURL = url; + String urlProperty = System.getProperty(URL_PROPERTY, DEFAULT_URL); + if(urlProperty != null){ + baseURL = urlProperty; } useAuth = Boolean.getBoolean(AUTH_PROPERTY); if(useAuth){ @@ -65,7 +65,12 @@ public abstract class CollectionSpaceClient { if(logger.isDebugEnabled()){ logger.debug("useSSL=" + useSSL); } - baseURL = useSSL ? DEFAULT_SSL_URL : DEFAULT_URL; + + // if the urlProperty prop is set, then it overrides. + if (urlProperty == null) { + baseURL = useSSL ? DEFAULT_SSL_URL : DEFAULT_URL; + } + if(logger.isDebugEnabled()){ logger.debug("using baseURL=" + baseURL); } -- 2.47.3