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
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user