cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] pop3.c: Fixed drop of final CRLF in EOB checking

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 20 Feb 2012 22:50:07 +0100 (CET)

On Sat, 18 Feb 2012, Steve Holme wrote:

> Please find attached a patch that fixes the drop of the final CRLF from a
> POP3 message during the EOB checking which Rich Gray reported on the 8th of
> this month.
>
> I've checked all the test cases you mentioned in your email and cannot
> figure out if an additional CRLF needs to be added to response sections of
> the XML spec or not.
>
> Are you able to run the test to see if this patch breaks them please?

Yes, it does but it begs the question of who's right and who's wrong! =)

test 800...[POP3 RETR]

  data FAILED:
--- log/check-expected 2012-02-20 00:15:11.000000000 +0100
+++ log/check-generated 2012-02-20 00:15:11.000000000 +0100
@@ -5,3 +5,4 @@

  --
    yours sincerely
+

  - abort tests

The idea in the test being that the <data> part is what is being sent from the
server, retrieved by curl. And the test script checks that after the transfer
but the generated output is not the same as the expected. The extra CRLF is
there:

$ hd log/check-generated
00000000 46 72 6f 6d 3a 20 6d 65 40 73 6f 6d 65 77 68 65 |From: me_at_somewhe|
00000010 72 65 0a 54 6f 3a 20 66 61 6b 65 40 6e 6f 77 68 |re.To: fake_at_nowh|
00000020 65 72 65 0a 0a 62 6f 64 79 0a 0a 2d 2d 0a 20 20 |ere..body..--. |
00000030 79 6f 75 72 73 20 73 69 6e 63 65 72 65 6c 79 0a |yours sincerely.|
00000040 0d 0a |..|
00000042

$ hd log/check-expected
00000000 46 72 6f 6d 3a 20 6d 65 40 73 6f 6d 65 77 68 65 |From: me_at_somewhe|
00000010 72 65 0a 54 6f 3a 20 66 61 6b 65 40 6e 6f 77 68 |re.To: fake_at_nowh|
00000020 65 72 65 0a 0a 62 6f 64 79 0a 0a 2d 2d 0a 20 20 |ere..body..--. |
00000030 79 6f 75 72 73 20 73 69 6e 63 65 72 65 6c 79 0a |yours sincerely.|
00000040

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-20