]> granicus.if.org Git - curl/commitdiff
pop3 test server: send terminating ".CRLF" only
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Feb 2012 21:24:44 +0000 (22:24 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Feb 2012 21:24:44 +0000 (22:24 +0100)
With commit 035ef06bda7 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.

tests/data/test1319
tests/data/test800
tests/ftpserver.pl

index ab31b9c25cdf716be6c319311e93fd500652f881..6461f476a8e0af1b92d13b24d805ebe7eaf3e019 100644 (file)
@@ -18,7 +18,7 @@ To: fake@nowhere
 body
 
 --
-  yours sincerely
+  yours sincerely\r
 </data>
 
 <datacheck>
@@ -30,7 +30,7 @@ To: fake@nowhere
 body
 
 --
-  yours sincerely
+  yours sincerely\r
 </datacheck>
 </reply>
 
index 3281b632df813260b4b3f26278d4dcf0ef7dc774..8c4850147657e61dca2f0815f8dd5177017da282 100644 (file)
@@ -10,13 +10,13 @@ RETR
 # Server-side
 <reply>
 <data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
-  yours sincerely
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
 </data>
 </reply>
 
index b4039b381266eed40eca6d5751bd58af06d307f5..034ac710daf1e10f87265c40816af0807623c1f9 100755 (executable)
@@ -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 @@ my @pop3list=(
          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;
 }