aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 129086dee..b7ea21c8c 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -897,7 +897,10 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
clen = -1;
if(post->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE)) {
- result = curl_mime_filedata(part, file->contents);
+ if(!strcmp(file->contents, "-"))
+ result = Curl_mime_file(part, stdin, 0);
+ else
+ result = curl_mime_filedata(part, file->contents);
if(!result && (post->flags & HTTPPOST_READFILE))
result = curl_mime_filename(part, NULL);
}