diff options
Diffstat (limited to 'apps/couch')
-rw-r--r-- | apps/couch/src/couch_rep.erl | 3 | ||||
-rw-r--r-- | apps/couch/src/couch_rep_changes_feed.erl | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/couch/src/couch_rep.erl b/apps/couch/src/couch_rep.erl index 8f2508f5..82b69bc9 100644 --- a/apps/couch/src/couch_rep.erl +++ b/apps/couch/src/couch_rep.erl @@ -834,7 +834,8 @@ ensure_full_commit(#http_db{headers = Headers} = Source, RequiredSeq) -> Req = Source#http_db{ resource = "_ensure_full_commit", method = post, - qs = [{seq, iolist_to_binary(?JSON_ENCODE(RequiredSeq))}], + qs = [{seq, case RequiredSeq of Bin when is_binary(Bin) -> Bin; + Else -> iolist_to_binary(?JSON_ENCODE(Else)) end}], headers = Headers1 }, {ResultProps} = couch_rep_httpc:request(Req), diff --git a/apps/couch/src/couch_rep_changes_feed.erl b/apps/couch/src/couch_rep_changes_feed.erl index 70db52a0..651069fb 100644 --- a/apps/couch/src/couch_rep_changes_feed.erl +++ b/apps/couch/src/couch_rep_changes_feed.erl @@ -64,7 +64,8 @@ init([Parent, #http_db{headers = Headers0} = Source, Since, PostProps]) -> BaseQS = [ {"style", all_docs}, {"heartbeat", 10000}, - {"since", iolist_to_binary(?JSON_ENCODE(Since))}, + {"since", case Since of Bin when is_binary(Bin) -> Bin; + Else -> iolist_to_binary(?JSON_ENCODE(Else)) end}, {"feed", Feed} ], {QS, Method, Body, Headers} = case get_value(<<"doc_ids">>, PostProps) of |