Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0.3, 1.1
-
None
Description
Steps to reproduce:
1. Create show function:
function(doc, req){
provides('text', function()
)
}
2. Make GET request to next resource:
http://localhost:5984/test/_design/foo/_show/send?format=text
3. Response would be 'baz!', but 'foo, bar, baz!' expected.
4. However, show function:
function(doc, req){
start(
)
send('foo, ');
send('bar, ');
return 'baz!';
}
will return correct result.
5. And show function:
function(doc, req){
provides('text', function()
)
}
will raise an TypeError expection:
{
error: "render_error"
reason: "function raised error: (new TypeError("resp is undefined", "/usr/share/couchdb/server/main.js", 817)) stacktrace: applyContentType((void 0),"text/plain; charset=utf-8")@/usr/share/couchdb/server/main.js:817 runShow(function (doc, req) {provides("text", function ()
);},[object Object],[object Array])@/usr/share/couchdb/server/main.js:991 ("_design/foo",[object Array],[object Array])@/usr/share/couchdb/server/main.js:1432 ()@/usr/share/couchdb/server/main.js:1475 @/usr/share/couchdb/server/main.js:1486 "
}
Both problem functions [1] and [5] works well if they are defined as list functions.