summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_external.erl
diff options
context:
space:
mode:
authorBenoit Chesneau <benoitc@apache.org>2010-08-15 14:07:46 +0000
committerBenoit Chesneau <benoitc@apache.org>2010-08-15 14:07:46 +0000
commitb94a613f2cdb3966ab30a8036af41943091f4de4 (patch)
tree0339784c1d57472be8fb0c783fa7bd2d7c62b976 /src/couchdb/couch_httpd_external.erl
parent9f78585f624d154579cb648d6e7b6298e994fee9 (diff)
add requested_path to the req so we know original path in shows/lists &
updates function. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@985678 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_external.erl')
-rw-r--r--src/couchdb/couch_httpd_external.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl
index 07202934..84ac44d3 100644
--- a/src/couchdb/couch_httpd_external.erl
+++ b/src/couchdb/couch_httpd_external.erl
@@ -56,6 +56,7 @@ process_external_req(HttpReq, Db, Name) ->
json_req_obj(Req, Db) -> json_req_obj(Req, Db, null).
json_req_obj(#httpd{mochi_req=Req,
method=Method,
+ requested_path_parts=RequestedPath,
path_parts=Path,
req_body=ReqBody
}, Db, DocId) ->
@@ -77,6 +78,7 @@ json_req_obj(#httpd{mochi_req=Req,
{<<"id">>, DocId},
{<<"uuid">>, couch_uuids:new()},
{<<"method">>, Method},
+ {<<"requested_path">>, RequestedPath},
{<<"path">>, Path},
{<<"query">>, json_query_keys(to_json_terms(Req:parse_qs()))},
{<<"headers">>, to_json_terms(Hlist)},