kocolosk commented on issue #607: Extra 500 reply added to list function 
response when accessed through rewrite
URL: https://github.com/apache/couchdb/issues/607#issuecomment-310432762
 
 
   @natevw one question for you -- when you invoke `getRow()` the second time, 
is the response `null`? The general pattern that I see for these list functions 
is a `while(getRow())` sort of thing, and it does look like there is some 
special logic that fires on the last invocation that returns null. 
Specifically, this happens when the database sends the `list_end` message, and 
there's definitely logic in that part of the code that transforms a `#lacc{}` 
into a proper mochiweb response.
   
   I'm not sufficiently deeply-versed in list functions to remember whether 
it's acceptable to "short-circuit" list processing before reaching the final 
null result on `getRow()`. I do find it interesting that this only crops up 
when you come in via a rewrite; I'm going to try to track that down now.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to