1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-13 21:15:08 -05:00

Merge pull request #23 from salty-horse/pop3_list_space

[pop3] remove extra space in LIST command
This commit is contained in:
Daniel Stenberg 2011-06-21 08:54:25 -07:00
commit 1614dc0745
3 changed files with 7 additions and 4 deletions

View File

@ -481,11 +481,14 @@ static CURLcode pop3_list(struct connectdata *conn)
CURLcode result = CURLE_OK;
struct pop3_conn *pop3c = &conn->proto.pop3c;
result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST %s", pop3c->mailbox);
if(pop3c->mailbox[0] != '\0')
result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST %s", pop3c->mailbox);
else
result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST");
if(result)
return result;
if(strlen(pop3c->mailbox))
if(pop3c->mailbox[0] != '\0')
state(conn, POP3_LIST_SINGLE);
else
state(conn, POP3_LIST);

View File

@ -38,7 +38,7 @@ pop3://%HOSTIP:%POP3PORT/ -u user:secret
<protocol>
USER user
PASS secret
LIST
LIST
QUIT
</protocol>
</verify>

View File

@ -36,7 +36,7 @@ pop3://%HOSTIP:%POP3PORT/ -u user:secret
<protocol>
USER user
PASS secret
LIST
LIST
QUIT
</protocol>
</verify>