Encoding parameters correctly, also using identifier instead of hostname

This commit is contained in:
Simon Pamies committed 2013-06-20 16:09:54 +02:00
1 parent c78112d357
commit 4033f0e25b
2 files changed
+3 -6

No files matched your search

@@ -29,12 +29,13 @@ public class ReplicationMasterDescriptorImpl implements ReplicationMasterDescrip
this.exchangeName = exchangeName;
}
@SuppressWarnings("deprecation")
@Override
public URL getReplicationRegistrationRequestURL(UUID uuid, String additional) throws MalformedURLException {
return new URL("http", hostname, servletPort, REPLICATION_SERVLET + "?" + ReplicationServlet.ACTION + "="
+ ReplicationServlet.Action.REGISTER.name()
+ "&" + ReplicationServlet.SERVER_UUID + "=" + uuid.toString()
+ "&" + ReplicationServlet.ADDITIONAL_INFORMATION + "=" + BuildVersion.getBuildVersion());
+ "&" + ReplicationServlet.ADDITIONAL_INFORMATION + "=" + java.net.URLEncoder.encode(BuildVersion.getBuildVersion()));
}
@Override