mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
imap: Added filtering of CAPABILITY and FETCH untagged responses
Only responses that contain "CAPABILITY" and "FETCH", respectively, will be sent to their response handler.
This commit is contained in:
parent
91b2184e1b
commit
f92f341a3f
@ -391,8 +391,13 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
|||||||
switch(imapc->state) {
|
switch(imapc->state) {
|
||||||
/* States which are interested in untagged responses */
|
/* States which are interested in untagged responses */
|
||||||
case IMAP_CAPABILITY:
|
case IMAP_CAPABILITY:
|
||||||
|
if(!imap_matchresp(line, len, "CAPABILITY"))
|
||||||
|
return FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
case IMAP_FETCH:
|
case IMAP_FETCH:
|
||||||
*resp = '*';
|
if(!imap_matchresp(line, len, "FETCH"))
|
||||||
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Ignore other untagged responses */
|
/* Ignore other untagged responses */
|
||||||
@ -400,6 +405,7 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*resp = '*';
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user