summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Dionne <bitdiddle@shadow.local>2010-09-27 22:20:09 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-10-01 22:47:31 -0400
commitca38a7a580cca8ede9f8f1db4eb447ef0994d6b3 (patch)
treed8d54f9a5bb07dd5a887691268c1675759c440aa
parentab5b2301dc713640170a7026c5ab1870a9ce4a5b (diff)
minor tweak from Adam to fix replication, change method spec to correct method for view_cleanup
-rw-r--r--apps/chttpd/src/chttpd.erl2
-rw-r--r--apps/chttpd/src/chttpd_misc.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/chttpd/src/chttpd.erl b/apps/chttpd/src/chttpd.erl
index 028cfcd7..37dc12d9 100644
--- a/apps/chttpd/src/chttpd.erl
+++ b/apps/chttpd/src/chttpd.erl
@@ -186,7 +186,7 @@ url_handler(_) -> fun chttpd_db:handle_request/1.
db_url_handlers() ->
[
- {<<"_view_cleanup">>, fun chttpd_view:handle_view_cleanup_req/2},
+ {<<"_view_cleanup">>, fun chttpd_db:handle_view_cleanup_req/2},
{<<"_compact">>, fun chttpd_db:handle_compact_req/2},
{<<"_design">>, fun chttpd_db:handle_design_req/2},
{<<"_temp_view">>, fun chttpd_db:handle_temp_view_req/2},
diff --git a/apps/chttpd/src/chttpd_misc.erl b/apps/chttpd/src/chttpd_misc.erl
index 7e6a3a83..640e7d0d 100644
--- a/apps/chttpd/src/chttpd_misc.erl
+++ b/apps/chttpd/src/chttpd_misc.erl
@@ -104,7 +104,7 @@ handle_task_status_req(Req) ->
send_method_not_allowed(Req, "GET,HEAD").
handle_replicate_req(#httpd{method='POST', user_ctx=Ctx} = Req) ->
- PostBody = get(post_body),
+ PostBody = chttpd:json_body_obj(Req),
try couch_rep:replicate(PostBody, Ctx) of
{ok, {continuous, RepId}} ->
send_json(Req, 202, {[{ok, true}, {<<"_local_id">>, RepId}]});