summaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 06ae39396..4da9dea16 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1398,19 +1398,30 @@ static CURLcode single_transfer(struct GlobalConfig *global,
switch(config->httpreq) {
case HTTPREQ_SIMPLEPOST:
- my_setopt_str(curl, CURLOPT_POSTFIELDS,
- config->postfields);
- my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
- config->postfieldsize);
+ if(config->resume_from) {
+ errorf(global, "cannot mix --continue-at with --data\n");
+ result = CURLE_FAILED_INIT;
+ }
+ else {
+ my_setopt_str(curl, CURLOPT_POSTFIELDS,
+ config->postfields);
+ my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
+ config->postfieldsize);
+ }
break;
case HTTPREQ_MIMEPOST:
/* free previous remainders */
curl_mime_free(config->mimepost);
config->mimepost = NULL;
- result = tool2curlmime(curl, config->mimeroot, &config->mimepost);
- if(result)
- break;
- my_setopt_mimepost(curl, CURLOPT_MIMEPOST, config->mimepost);
+ if(config->resume_from) {
+ errorf(global, "cannot mix --continue-at with --form\n");
+ result = CURLE_FAILED_INIT;
+ }
+ else {
+ result = tool2curlmime(curl, config->mimeroot, &config->mimepost);
+ if(!result)
+ my_setopt_mimepost(curl, CURLOPT_MIMEPOST, config->mimepost);
+ }
break;
default:
break;