From fd5f0c070746b2b1634265cb4cbcdbbfbb88e6fd Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 13 Feb 2013 10:03:18 +0100 Subject: [PATCH] Trim first line of POP3 response to get rid of CR, if any. --- src/net/pop3/POP3Response.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/pop3/POP3Response.cpp b/src/net/pop3/POP3Response.cpp index a48dc72f..d61e1e6d 100644 --- a/src/net/pop3/POP3Response.cpp +++ b/src/net/pop3/POP3Response.cpp @@ -324,13 +324,13 @@ bool POP3Response::stripFirstLine if (end != string::npos) { - if (firstLine) *firstLine = buffer.substr(0, end); + if (firstLine) *firstLine = utility::stringUtils::trim(buffer.substr(0, end)); result = buffer.substr(end + 1); return true; } else { - if (firstLine) *firstLine = buffer; + if (firstLine) *firstLine = utility::stringUtils::trim(buffer); result = ""; return false; }