Skip to content

Commit

Permalink
0001472: Node Ids don't work in URLs if they have spaces in them. Nee…
Browse files Browse the repository at this point in the history
…d to urlencode the node id.
  • Loading branch information
chenson42 committed Nov 23, 2013
1 parent e7e8a9e commit 5e6cc18
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -26,15 +26,18 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
import java.util.zip.GZIPInputStream;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.jumpmind.exception.IoException;
import org.jumpmind.symmetric.ISymmetricEngine;
import org.jumpmind.symmetric.common.ParameterConstants;
import org.jumpmind.symmetric.io.IoConstants;
Expand Down Expand Up @@ -281,7 +284,11 @@ protected String addNodeId(String base, String nodeId, String connector) {
sb.append(connector);
sb.append(WebConstants.NODE_ID);
sb.append("=");
sb.append(nodeId);
try {
sb.append(URLEncoder.encode(nodeId, IoConstants.ENCODING));
} catch (UnsupportedEncodingException e) {
throw new IoException(e);
}
return sb.toString();
}
}

0 comments on commit 5e6cc18

Please sign in to comment.