summaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-10-12 19:36:16 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-10-12 19:36:16 +0100
commit0401734dfd39617a42318295a6e54064b40b2502 (patch)
tree823fce7c271e1a8ee7447260b9c690050f0c5c9e /lib/formdata.c
parent56509055d23986479f472d667625426f51074992 (diff)
downloadcurl-0401734dfd39617a42318295a6e54064b40b2502.tar.gz
mime: keep "text/plain" content type if user-specified.
Include test cases in 554, 587, 650. Fixes https://github.com/curl/curl/issues/1986
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 3568ac579..d0579c52f 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -907,7 +907,7 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
result = curl_mime_headers(part, file->contentheader, 0);
/* Set the content type. */
- if(!result &&file->contenttype)
+ if(!result && file->contenttype)
result = curl_mime_type(part, file->contenttype);
/* Set field name. */