mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
pop3/smtp: return *WEIRD_SERVER_REPLY when not understood
This leaves the CURLE_RECV_ERROR error code for explicit failure to receive network data and allows users to better separate the problems. Ref #8356 Reported-by: Rianov Viacheslav Closes #8506
This commit is contained in:
parent
3a4182d468
commit
5a9d7c4e68
9 changed files with 14 additions and 14 deletions
|
|
@ -1037,7 +1037,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data, int smtpcode,
|
|||
if((smtp->rcpt && smtpcode/100 != 2 && smtpcode != 553 && smtpcode != 1) ||
|
||||
(!smtp->rcpt && smtpcode/100 != 2 && smtpcode != 1)) {
|
||||
failf(data, "Command failed: %d", smtpcode);
|
||||
result = CURLE_RECV_ERROR;
|
||||
result = CURLE_WEIRD_SERVER_REPLY;
|
||||
}
|
||||
else {
|
||||
/* Temporarily add the LF character back and send as body to the client */
|
||||
|
|
@ -1182,7 +1182,7 @@ static CURLcode smtp_state_postdata_resp(struct Curl_easy *data,
|
|||
(void)instate; /* no use for this yet */
|
||||
|
||||
if(smtpcode != 250)
|
||||
result = CURLE_RECV_ERROR;
|
||||
result = CURLE_WEIRD_SERVER_REPLY;
|
||||
|
||||
/* End of DONE phase */
|
||||
state(data, SMTP_STOP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue