kilianc/node-apiserver — Issue #3: streaming response should check and fix trailing/missing commas
Author: kilianc
Created: 2011-10-19 12:55:41+00:00
State: open

__Apiserver `streamResponseData` prototype:__

````javascript
ApiServer.prototype.streamResponseData = function(sender, request, response, responseChunk, isLast)
````
the server should check a missing isLast == true responseStreamData event ading a dummy empty object,
or responding with an error.

````javascript
self.emit("responseStreamData", request, response, obj1, false);
self.emit("responseStreamEnd", request, response); //error
````

It should also check a double isLast == true responseStreamData event.

````javascript
self.emit("responseStreamData", request, response, obj1, true);
self.emit("responseStreamData", request, response, obj2, true); //error
````