incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joscha Feth" <jos...@feth.com>
Subject _list behaves weird on start() after using getRow()
Date Wed, 30 Dec 2009 22:27:57 GMT
Hi there,

I was experiencing problems with _list functions lately, and I narrowed
down the problem:

list function A:
----------------
function(head,req) {
	if(true) {
		start({"code": 401});
	} else {
		start({"code": 200});
	}
}

list function B:
----------------
function(head,req) {
	getRow();
	if(true) {
		start({"code": 401});
	} else {
		start({"code": 200});
	}
}


as you can see A and B are completely identical except list function B
has an additional call to getRow().
Now I would expect those list functions to return the same result
(always return a 401), but list function B actually always returns a
200 - regardless of what code is given in start().
It seems as if the call to getRow() always makes the list function
return a 200. Is this a bug or am I missing something? I am on CouchDB
0.10 Windows.

regards,
Joscha

-- 



Mime
View raw message