Compare commits
4 Commits
d42aa109e7
...
361ff18212
Author | SHA1 | Date | |
---|---|---|---|
361ff18212 | |||
d0db95715b | |||
512ca14054 | |||
f963a7cbb3 |
11
lib/nntp.js
11
lib/nntp.js
@@ -178,7 +178,10 @@ NNTP.prototype.connect = function(options) {
|
|||||||
// many? servers don't support the *mandatory* CAPABILITIES command :-(
|
// many? servers don't support the *mandatory* CAPABILITIES command :-(
|
||||||
if (err && cmd !== 'CAPABILITIES') {
|
if (err && cmd !== 'CAPABILITIES') {
|
||||||
self.emit('error', err);
|
self.emit('error', err);
|
||||||
return self._socket.end();
|
if (self._socket) {
|
||||||
|
self._socket.end()
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// TODO: try sending CAPABILITIES first thing
|
// TODO: try sending CAPABILITIES first thing
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
@@ -650,6 +653,12 @@ NNTP.prototype.post = function(msg, cb) {
|
|||||||
text += CRLF;
|
text += CRLF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg.face) {
|
||||||
|
text += 'Face: ';
|
||||||
|
text += msg.face;
|
||||||
|
text += CRLF;
|
||||||
|
}
|
||||||
|
|
||||||
text += 'Content-Type: text/plain; charset=utf-8';
|
text += 'Content-Type: text/plain; charset=utf-8';
|
||||||
text += CRLF;
|
text += CRLF;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user