aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c17
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 */