Skip to content

Commit

Permalink
URL encode the since parameter for bigcouch
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Apr 26, 2012
1 parent ed0aa35 commit 44f0ad5
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,5 +1,7 @@
package com.github.rnewson.couchdb.lucene.couchdb;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
Expand Down Expand Up @@ -50,7 +52,11 @@ private BigCouchUpdateSequence(final String encodedVector, final String packedSe

@Override
public String appendSince(final String url) {
return url + "&since=" + since;
try {
return url + "&since=" + URLEncoder.encode(since, "US-ASCII");
} catch (UnsupportedEncodingException e) {
throw new Error("US-ASCII inexplicably missing.");
}
}

@Override
Expand Down

0 comments on commit 44f0ad5

Please sign in to comment.