cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SMTP, data corruption and dot stuffing

From: <operaxxox_at_yahoo.ca>
Date: Wed, 19 Oct 2011 12:49:30 +0200

I've written a small test program to exhibit the problem. This is
not a correct email, I'm aware of it!
On Windows I've tried defining CURL_MAX_WRITE_SIZE under 16384 but
libcurl always used a +3 bytes value so it screwed the test.

You can find the source here : http://pastebin.com/8gQtUZLZ

With this program you obtain at the end of the transfer :

3fae: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3ff0: AAAAAAAAAAAAAAA
=> Send data, 0000000002 bytes (0x00000002)
0000: .B

I do not expect a dot before B, I'm not sending one I'm sending a
<CR><LF>

If you replace the <CR><LF> before B with AA, you obtain :

3fae: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3ff0: AAAAAAAAAAAAAAAA
=> Send data, 0000000002 bytes (0x00000002)
0000: AB

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-19