diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-12-22 18:03:44 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-12-22 18:03:44 +0000 |
commit | ea3b1153e52ac1513da4d634eedefb05c261039c (patch) | |
tree | 858c5b3d81509bfe784b8d2d1252921cbf34aa54 /src/couchdb/couch_httpd_external.erl | |
parent | 22c551bb103072826c0299265670d1483c753dde (diff) |
move query server to a design-doc based protocol, closes COUCHDB-589
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@893249 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_external.erl')
-rw-r--r-- | src/couchdb/couch_httpd_external.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl index 86b2bfc6..13aff847 100644 --- a/src/couchdb/couch_httpd_external.erl +++ b/src/couchdb/couch_httpd_external.erl @@ -13,7 +13,7 @@ -module(couch_httpd_external). -export([handle_external_req/2, handle_external_req/3]). --export([send_external_response/2, json_req_obj/2]). +-export([send_external_response/2, json_req_obj/2, json_req_obj/3]). -export([default_or_content_type/2, parse_external_response/1]). -import(couch_httpd,[send_error/4]). @@ -53,12 +53,12 @@ process_external_req(HttpReq, Db, Name) -> _ -> send_external_response(HttpReq, Response) end. - +json_req_obj(Req, Db) -> json_req_obj(Req, Db, null). json_req_obj(#httpd{mochi_req=Req, method=Verb, path_parts=Path, req_body=ReqBody - }, Db) -> + }, Db, DocId) -> Body = case ReqBody of undefined -> Req:recv_body(); Else -> Else @@ -74,6 +74,7 @@ json_req_obj(#httpd{mochi_req=Req, {ok, Info} = couch_db:get_db_info(Db), % add headers... {[{<<"info">>, {Info}}, + {<<"id">>, DocId}, {<<"verb">>, Verb}, {<<"path">>, Path}, {<<"query">>, to_json_terms(Req:parse_qs())}, |