mscdex/node-imap — pull request #330 by juhovh (2013-10-30 20:58:05+00:00)
Title: Remove useless _tryreads because they cause problems.

These cases are already handled in _parse function.

Resending the pull request, because it wasn't broken after all. The literal data is read from the stream buffer instead of the already read buffer and that is the wrong location. If we unshift the whole rest of the read buffer back to the stream and try to read the literal from there it should work just fine.