3rd-Eden/node-memcached — pull request #84 by renedx (2013-02-27 18:56:09+00:00)
Title: Chunked response fix

This fixes an issue with chunked responses (large amounts of data). It removes the last \0 from every response before it gets parsed. If we keep the \0, it will be merged with the total response and crash the parser.

Parser will otherwise try to parse the wrong line (command), as it thinks that the command is already received.

The error was:
```
Parse:
VALUE invoices::#17748 2 196
Error:
error - 21/01 - 22:17 Caught exception: SyntaxError: Unexpected token V
info - 21/01 - 22:17 SyntaxError: Unexpected token V
at Object.parse (native)
at Socket.value (/node/node_modules/memcached/lib/memcached.js:432:17)
at EventEmitter.rawDataReceived (/node/node_modules/memcached/lib/memcached.js:624:51)
at EventEmitter.BufferBuffer (/node/node_modules/memcached/lib/memcached.js:584:12)
at Socket.bowlofcurry (/node/node_modules/memcached/lib/utils.js:109:15)
at Socket.EventEmitter.emit (events.js:96:17)
at TCP.onread (net.js:392:31)
```

I've got it running for a while now, without any issues loading up millions of items in seconds for testing.