Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

URL encode the since parameter for bigcouch

  • Loading branch information...
commit 44f0ad54b494adf4faed1641b806913bbdbe9356 1 parent ed0aa35
@rnewson authored
View
8 src/main/java/com/github/rnewson/couchdb/lucene/couchdb/UpdateSequence.java
@@ -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;
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.