diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-11-26 22:44:28 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-11-26 23:31:54 +0000 |
commit | 4bd860a001921e1e007ae448cfdd2c983018c057 (patch) | |
tree | 3d9c73afc863d99c26c69e8ee83dfdee5ada851f /lib/transfer.c | |
parent | aa3e8dd3da62537af1546dc41aaf9042985f8b7a (diff) |
smtp: Added support for the conversion of Unix newlines during mail send
Added support for the automatic conversion of Unix newlines to CRLF
during mail uploads.
Feature: http://curl.haxx.se/bug/view.cgi?id=1456
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index b48dfce84..2324f2bdd 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -903,15 +903,6 @@ static CURLcode readwrite_upload(struct SessionHandle *data, /* store number of bytes available for upload */ data->req.upload_present = nread; -#ifndef CURL_DISABLE_SMTP - if(conn->handler->protocol & PROTO_FAMILY_SMTP) { - result = Curl_smtp_escape_eob(conn, nread); - if(result) - return result; - } - else -#endif /* CURL_DISABLE_SMTP */ - /* convert LF to CRLF if so asked */ if((!sending_http_headers) && ( #ifdef CURL_DO_LINEEND_CONV @@ -962,6 +953,14 @@ static CURLcode readwrite_upload(struct SessionHandle *data, that instead of reading more data */ } +#ifndef CURL_DISABLE_SMTP + if(conn->handler->protocol & PROTO_FAMILY_SMTP) { + result = Curl_smtp_escape_eob(conn, nread); + if(result) + return result; + } +#endif /* CURL_DISABLE_SMTP */ + /* write to socket (send away data) */ result = Curl_write(conn, conn->writesockfd, /* socket to send to */ |