summaryrefslogtreecommitdiff
path: root/apps/couch/src/couch_rep_changes_feed.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2011-11-09 11:19:37 -0800
committerAdam Kocoloski <adam@cloudant.com>2011-11-09 11:19:37 -0800
commit0b2c8fb248a8d8671f30e8111ca5188113eb2c93 (patch)
tree4b102373cc25ca231f3d027c4e5a5f0f03e35ef6 /apps/couch/src/couch_rep_changes_feed.erl
parent4216ca260c305ea3b39b2a45a8dd2e6d5cdb529f (diff)
parent6ad4258c2f2ca158ae311931d348941e74f01b89 (diff)
Merge pull request #80 from cloudant/12833-conditional_json_encode
Diffstat (limited to 'apps/couch/src/couch_rep_changes_feed.erl')
-rw-r--r--apps/couch/src/couch_rep_changes_feed.erl3
1 files changed, 2 insertions, 1 deletions
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