Fixing handling of URLs with query parameters
@@ -828,10 +828,16 @@ public class IdentityUtil {
throw IdentityRuntimeException.error("Query URL cannot contain \'#\': " + baseUrl);
}
StringBuilder queryString = new StringBuilder(baseUrl);
+
+ if (parameterMap.size() > 0) {
if(queryString.indexOf("?") < 0) {
queryString.append("?");
+ } else {
+ queryString.append("&");
}
queryString.append(buildQueryComponent(parameterMap));
+ }
+
return queryString.toString();
}
