Handle possibly trailing slashes for older versions of mxisd

This commit is contained in:
Max Dor
2019-02-06 19:55:22 +01:00
parent 8d6850d346
commit a4c18dee5d
2 changed files with 5 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package io.kamax.mxisd.matrix;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
import io.kamax.mxisd.http.IsAPIv1;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
@@ -32,7 +33,7 @@ public class IdentityServerUtils {
try {
// FIXME use Apache HTTP client
HttpURLConnection rootSrvConn = (HttpURLConnection) new URL(remote + "/_matrix/identity/api/v1/").openConnection();
HttpURLConnection rootSrvConn = (HttpURLConnection) new URL(remote + IsAPIv1.Base).openConnection();
// TODO turn this into a configuration property
rootSrvConn.setConnectTimeout(2000);