Skip to content

Commit

Permalink
Expose raw_path in req to show, list and externals.
Browse files Browse the repository at this point in the history
Closes COUCHDB-676
Closes COUCHDB-341
  • Loading branch information
janl committed Oct 30, 2011
1 parent 946b21b commit 7809f3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/www/script/test/list_views.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions src/couchdb/couch_httpd_external.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 7809f3c

Please sign in to comment.