From 39b479de9d2bba960919fdf4105b30d822508cab Mon Sep 17 00:00:00 2001 From: mscdex Date: Thu, 4 Jul 2013 11:58:04 -0400 Subject: [PATCH] Connection: need to write CRLF after append() data --- lib/Connection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Connection.js b/lib/Connection.js index 4b33bb4..ca0dc78 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -171,8 +171,12 @@ Connection.prototype.connect = function() { self.debug && self.debug('=> ' + inspect(CRLF)); self._sock.write(CRLF); } else if (type === 'APPEND') { + var val = self._curReq.appendData; + if (Buffer.isBuffer(self._curReq.appendData)) + val = val.toString('utf8'); self.debug && self.debug('=> ' + inspect(self._curReq.appendData)); self._sock.write(self._curReq.appendData); + self._sock.write(CRLF); } else if (self._curReq.lines && self._curReq.lines.length) { var line = self._curReq.lines.shift() + '\r\n'; self.debug && self.debug('=> ' + inspect(line));