Connection: need to write CRLF after append() data

fork
mscdex 12 years ago
parent e96102d9ce
commit 39b479de9d

@ -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));

Loading…
Cancel
Save