Permalink
Browse files

pop3 test server: send terminating ".CRLF" only

With commit 035ef06 applied, the test pop3 server needs to send
".\r\n" as the body terminating sequence and there needs to be a final
CRLF in the actual body in the test data file.
  • Loading branch information...
1 parent 035ef06 commit 77a21ff62380de7e53fa135ebbfd65d9908a4894 @bagder bagder committed Feb 21, 2012
Showing with 15 additions and 14 deletions.
  1. +2 −2 tests/data/test1319
  2. +7 −7 tests/data/test800
  3. +6 −5 tests/ftpserver.pl
View
@@ -18,7 +18,7 @@ To: fake@nowhere
body
--
- yours sincerely
+ yours sincerely
</data>
<datacheck>
@@ -30,7 +30,7 @@ To: fake@nowhere
body
--
- yours sincerely
+ yours sincerely
</datacheck>
</reply>
View
@@ -10,13 +10,13 @@ RETR
# Server-side
<reply>
<data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
- yours sincerely
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
</data>
</reply>
View
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -857,8 +857,9 @@ sub RETR_pop3 {
sendcontrol $d;
}
- # end with the magic 5-byte end of mail marker
- sendcontrol "\r\n.\r\n";
+ # end with the magic 3-byte end of mail marker, assumes that the
+ # mail body ends with a CRLF!
+ sendcontrol ".\r\n";
return 0;
}
@@ -880,8 +881,8 @@ sub LIST_pop3 {
sendcontrol $d;
}
- # end with the magic 5-byte end of listing marker
- sendcontrol "\r\n.\r\n";
+ # end with the magic 3-byte end of listing marker
+ sendcontrol ".\r\n";
return 0;
}

0 comments on commit 77a21ff

Please sign in to comment.