From af6dcc92d56c8913a49a4c8b776f65c717f242d6 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Tue, 21 Jun 2011 01:33:32 +0300 Subject: [pop3] remove extra space in LIST command Some servers, e.g. mail.bezeqint.net:110, consider it a syntax error --- lib/pop3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/pop3.c') diff --git a/lib/pop3.c b/lib/pop3.c index 0581c58b0..dc5a1c2fa 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -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); -- cgit v1.2.3