summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_misc_handlers.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-08-19 00:51:19 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-08-19 00:51:19 +0000
commit836b9af505343d584df271897cdca3b165d79990 (patch)
treecc030d91e27d9dc6c7303bf0ddce59867f7f4760 /src/couchdb/couch_httpd_misc_handlers.erl
parenta6ef08d1670d15e3a91befdc3411a64e5a27c0fd (diff)
continuous replication request returns 202 Accepted and the _local docid
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805643 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_misc_handlers.erl')
-rw-r--r--src/couchdb/couch_httpd_misc_handlers.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index e72f9d2f..c3c5b37a 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -80,6 +80,8 @@ handle_task_status_req(Req) ->
handle_replicate_req(#httpd{method='POST'}=Req) ->
PostBody = couch_httpd:json_body_obj(Req),
try couch_rep:replicate(PostBody, Req#httpd.user_ctx) of
+ {ok, {continuous, RepId}} ->
+ send_json(Req, 202, {[{ok, true}, {<<"_local_id">>, RepId}]});
{ok, {JsonResults}} ->
send_json(Req, {[{ok, true} | JsonResults]});
{error, {Type, Details}} ->