mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
smtp: Fixed handling of multiline server greeting responses
Incorrectly processed multiline server greeting responses as "wanted"
continue responses in smtp_endofresp(), from commit f16c0de4e9
,
which in turn broke the SMTP server detection in the test suite,
because the EHLO command would not be sent.
This commit is contained in:
parent
90ec8763a5
commit
4a9fe26837
@ -228,6 +228,7 @@ static void smtp_to_smtps(struct connectdata *conn)
|
||||
static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
|
||||
int *resp)
|
||||
{
|
||||
struct smtp_conn *smtpc = &conn->proto.smtpc;
|
||||
bool result = FALSE;
|
||||
|
||||
/* Nothing for us */
|
||||
@ -247,7 +248,7 @@ static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
|
||||
*resp = 0;
|
||||
}
|
||||
/* Do we have a multiline (continuation) response? */
|
||||
else if(line[3] == '-') {
|
||||
else if(line[3] == '-' && smtpc->state == SMTP_EHLO) {
|
||||
result = TRUE;
|
||||
*resp = 1; /* Internal response code */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user