Commit d4c62d84 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Auto-append / to end of connection uri if it doesn't exist.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9946 b35dd754-fafc-0310-a699-88a17e54d16e
parent d21db425
...@@ -159,6 +159,9 @@ public class ClearspaceManager extends BasicModule implements ExternalComponentM ...@@ -159,6 +159,9 @@ public class ClearspaceManager extends BasicModule implements ExternalComponentM
this.properties = properties; this.properties = properties;
this.uri = properties.get("clearspace.uri"); this.uri = properties.get("clearspace.uri");
if (!this.uri.endsWith("/")) {
this.uri = this.uri + "/";
}
sharedSecret = properties.get("clearspace.sharedSecret"); sharedSecret = properties.get("clearspace.sharedSecret");
if (Log.isDebugEnabled()) { if (Log.isDebugEnabled()) {
...@@ -310,8 +313,11 @@ public class ClearspaceManager extends BasicModule implements ExternalComponentM ...@@ -310,8 +313,11 @@ public class ClearspaceManager extends BasicModule implements ExternalComponentM
* @param uri the Clearspace service URI. * @param uri the Clearspace service URI.
*/ */
public void setConnectionURI(String uri) { public void setConnectionURI(String uri) {
if (!uri.endsWith("/")) {
uri = uri + "/";
}
this.uri = uri; this.uri = uri;
properties.put("clearspace.uri", uri); properties.put("clearspace.uri", uri);
if (isEnabled()) { if (isEnabled()) {
startClearspaceConfig(); startClearspaceConfig();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment