couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [1/2] git commit: Expose raw_path in req to show, list and externals.
Date Sun, 30 Oct 2011 21:05:31 GMT
Updated Branches:
  refs/heads/1.2.x 946b21be1 -> 7809f3ca8
  refs/heads/master 200020827 -> ee8044ff5


Expose raw_path in req to show, list and externals.

Closes COUCHDB-676
Closes COUCHDB-341


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7809f3ca
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7809f3ca
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7809f3ca

Branch: refs/heads/1.2.x
Commit: 7809f3ca844da984ebf1a90deefa2b4ab83d289e
Parents: 946b21b
Author: Jan Lehnardt <jan@apache.org>
Authored: Sun Oct 30 22:03:42 2011 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Sun Oct 30 22:05:20 2011 +0100

----------------------------------------------------------------------
 share/www/script/test/list_views.js  |    2 ++
 src/couchdb/couch_httpd_external.erl |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7809f3ca/share/www/script/test/list_views.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index 6449bd7..4cd9edf 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -252,6 +252,8 @@ couchTests.list_views = function(debug) {
   T(resp.req.headers.Host);
   T(resp.req.headers["User-Agent"]);
   T(resp.req.cookie);
+  TEquals("/test_suite_db/_design/lists/_list/basicJSON/basicView?update_seq=true",
+    resp.req.raw_path, "should include raw path");
 
   // get with query params
   xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/simpleForm/basicView?startkey=3&endkey=8");

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7809f3ca/src/couchdb/couch_httpd_external.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl
index c199b4a..bfe77a3 100644
--- a/src/couchdb/couch_httpd_external.erl
+++ b/src/couchdb/couch_httpd_external.erl
@@ -87,6 +87,7 @@ json_req_obj(#httpd{mochi_req=Req,
         {<<"method">>, Method},
         {<<"requested_path">>, RequestedPath},
         {<<"path">>, Path},
+        {<<"raw_path">>, ?l2b(Req:get(raw_path))},
         {<<"query">>, json_query_keys(to_json_terms(Req:parse_qs()))},
         {<<"headers">>, to_json_terms(Hlist)},
         {<<"body">>, Body},


Mime
View raw message