fork
mscdex 11 years ago
parent d8274c2d93
commit 30d0b12953

@ -644,7 +644,9 @@ Connection.prototype._fetch = function(which, uids, options) {
validateUIDList(uids);
uids = uids.join(',');
var cmd = which + 'FETCH ' + uids + ' (', fetching = [];
var cmd = which + 'FETCH ' + uids + ' (',
fetching = [],
i, len, key;
if (this.serverSupports('X-GM-EXT-1')) {
fetching.push('X-GM-THRID');
@ -669,7 +671,7 @@ Connection.prototype._fetch = function(which, uids, options) {
prefix = (options.markSeen ? '' : '.PEEK');
if (!Array.isArray(bodies))
bodies = [bodies];
for (var i = 0, len = bodies.length; i < len; ++i) {
for (i = 0, len = bodies.length; i < len; ++i) {
fetching.push('BODY[' + bodies[i] + ']');
cmd += ' BODY' + prefix + '[' + bodies[i] + ']';
}
@ -682,7 +684,7 @@ Connection.prototype._fetch = function(which, uids, options) {
var modifiers = options.modifiers,
modkeys = (typeof modifiers === 'object' ? Object.keys(modifiers) : []),
modstr = ' (';
for (var i = 0, len = modkeys.length, key; i < len; ++i) {
for (i = 0, len = modkeys.length, key; i < len; ++i) {
key = modkeys[i].toUpperCase();
if (key === 'CHANGEDSINCE' && this.serverSupports('CONDSTORE'))
modstr += key + ' ' + modifiers[modkeys[i]] + ' ';

@ -44,7 +44,7 @@ function Parser(stream, debug) {
self._tryread(self._literallen);
else
self._tryread();
}
};
this._stream.on('readable', this._cbReadable);
process.nextTick(this._cbReadable);
}
@ -173,7 +173,7 @@ Parser.prototype._resTagged = function() {
};
Parser.prototype._resUntagged = function() {
var self = this, m;
var m;
if (m = RE_BODYLITERAL.exec(this._buffer)) {
// BODY literal -- stream it
var which = m[1], size = parseInt(m[2], 10);

Loading…
Cancel
Save