fix fetch command check when determining a response was unsolicited

fork
mscdex 12 years ago
parent 685a682572
commit 502a2aaf4b

@ -28,6 +28,7 @@ var CRLF = '\r\n',
RE_TEXT_CODE = /([^ ]+)(?: (.*))?$/, RE_TEXT_CODE = /([^ ]+)(?: (.*))?$/,
RE_RES_IDLE = /^IDLE /i, RE_RES_IDLE = /^IDLE /i,
RE_RES_NOOP = /^NOOP /i, RE_RES_NOOP = /^NOOP /i,
RE_CMD_FETCH = /^(?:UID )?FETCH/i,
RE_PARTID = /^(?:[\d]+[\.]{0,1})*[\d]+$/, RE_PARTID = /^(?:[\d]+[\.]{0,1})*[\d]+$/,
//RE_ISPARTIAL = /<(\d+)>$/, //RE_ISPARTIAL = /<(\d+)>$/,
RE_DBLQ = /"/g, RE_DBLQ = /"/g,
@ -323,7 +324,8 @@ ImapConnection.prototype.connect = function(loginCb) {
details, val; details, val;
isUnsolicited = isUnsolicited isUnsolicited = isUnsolicited
|| (requests[0] && requests[0].cmd !== 'FETCH'); || (requests[0]
&& !RE_CMD_FETCH.test(requests[0].cmdstr));
if (!isUnsolicited) if (!isUnsolicited)
bodies = parsers.parseFetchBodies(m.info, indata.literals); bodies = parsers.parseFetchBodies(m.info, indata.literals);

Loading…
Cancel
Save