summaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-07-23 22:10:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-07-26 23:45:01 +0200
commit41fb6443ceeda65c09dbe0e1fd7591269e4966a9 (patch)
tree9600c8058dc066e976f2d33d0ea7177a9a961f95 /lib/formdata.c
parente5dfe6c282366508a2d61660b2ce9b53bf83df3b (diff)
downloadcurl-41fb6443ceeda65c09dbe0e1fd7591269e4966a9.tar.gz
formadd: CURLFORM_FILECONTENT wrongly rejected some option combos
The code for CURLFORM_FILECONTENT had its check for duplicate options wrong so that it would reject CURLFORM_PTRNAME if used in combination with it (but not CURLFORM_COPYNAME)! The flags field used for this purpose cannot be interpreted that broadly. Bug: http://curl.haxx.se/mail/lib-2013-07/0258.html Reported-by: Byrial Jensen
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 decb84d9f..1984a9712 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -426,7 +426,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
/* Get contents from a given file name */
case CURLFORM_FILECONTENT:
- if(current_form->flags != 0)
+ if(current_form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_READFILE))
return_value = CURL_FORMADD_OPTION_TWICE;
else {
const char *filename = array_state?