Skip to content

Commit

Permalink
0003000: The registration ack for registration redirect does not work
Browse files Browse the repository at this point in the history
because the ack url is incorrectly rebuilt for the redirected ack
  • Loading branch information
chenson42 committed Feb 27, 2017
1 parent 3820d3e commit ad67d53
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -128,7 +128,6 @@
import org.jumpmind.symmetric.transport.ServiceUnavailableException;
import org.jumpmind.symmetric.transport.SyncDisabledException;
import org.jumpmind.symmetric.transport.TransportException;
import org.jumpmind.symmetric.transport.http.HttpTransportManager;
import org.jumpmind.symmetric.transport.internal.InternalIncomingTransport;
import org.jumpmind.symmetric.web.WebConstants;

Expand Down Expand Up @@ -295,8 +294,11 @@ public void loadDataFromPull(Node remote, RemoteNodeStatus status) throws IOExce
* redirect for the ack
*/
String url = transport.getRedirectionUrl();
url = url.replace(HttpTransportManager.buildRegistrationUrl("", local),
"");
int index = url.indexOf("/registration?");
if (index >= 0) {
url = url.substring(0, index);
}
log.info("Setting the sync url for ack to: {}", url);
remote.setSyncUrl(url);
}
sendAck(remote, local, localSecurity, list, transportManager);
Expand Down

0 comments on commit ad67d53

Please sign in to comment.