diff options
author | Steve Holme <steve_holme@hotmail.com> | 2015-11-20 07:01:01 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2015-11-20 07:01:01 +0000 |
commit | 41efdadf094d1dede5d3f8d6c9be7b8cf98dd894 (patch) | |
tree | 682dc1bb1f6c4284c7ab77791a2ed0887f20aaac /lib | |
parent | 6af80afe49c18bef8c34e043e6183b9339ce353b (diff) |
pop3: Differentiate between success and continuation responses
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pop3.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/pop3.c b/lib/pop3.c index dd4a32b2f..b96baf609 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -214,7 +214,7 @@ static const struct Curl_handler Curl_handler_pop3s_proxy = { /* SASL parameters for the pop3 protocol */ static const struct SASLproto saslpop3 = { "pop", /* The service name */ - '+', /* Code received when continuation is expected */ + '*', /* Code received when continuation is expected */ '+', /* Code to receive upon authentication success */ 255 - 8, /* Maximum initial response length (no max) */ pop3_perform_auth, /* Send authentication command */ @@ -265,14 +265,20 @@ static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len, return TRUE; } - /* Do we have a success or continuation response? */ - if((len >= 3 && !memcmp("+OK", line, 3)) || - (len >= 1 && !memcmp("+", line, 1))) { + /* Do we have a success response? */ + if(len >= 3 && !memcmp("+OK", line, 3)) { *resp = '+'; return TRUE; } + /* Do we have a continuation response? */ + if(len >= 1 && !memcmp("+", line, 1)) { + *resp = '*'; + + return TRUE; + } + return FALSE; /* Nothing for us */ } |