diff options
author | Jan Lehnardt <jan@apache.org> | 2011-04-16 19:19:20 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2011-04-16 19:19:20 +0000 |
commit | f02041ef74bf356a00c98e220b0841c4b3fbd0a9 (patch) | |
tree | f546d506ec9ef66808f428827436c0153e61c5e5 /share/www/script | |
parent | ba7c0c7135bebedbd8aae327535729e8756d7467 (diff) |
Don't call mochiweb_util:parse_qs/1 with an undefined argument.
Found this while debugging COUCHDB-1116.
Closes COUCHDB-1116
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1094031 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/test/list_views.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js index e98a212e..2c1ac321 100644 --- a/share/www/script/test/list_views.js +++ b/share/www/script/test/list_views.js @@ -447,4 +447,29 @@ couchTests.list_views = function(debug) { value: "{couch_native_process, start_link, []}" }], erlViewTest); + // COUCHDB-1113 + var ddoc = { + _id: "_design/test", + views: { + me: { + map: (function(doc) { emit(null,null)}).toString() + } + }, + lists: { + you: (function(head, req) { + var row; + while(row = getRow()) { + send(row); + } + }).toString() + } + }; + db.save(ddoc); + + var resp = CouchDB.request("GET", "/" + db.name + "/_design/test/_list/you/me", { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + } + }); + TEquals(200, resp.status, "should return a 200 response"); }; |