diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2017-09-06 13:42:03 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2017-09-06 13:42:03 +0100 |
commit | c96d96bc5fd334f90fce04bfe89a9ecbbe8e6094 (patch) | |
tree | a61978674bdcc793d825a2eab26568bc66af21a3 /src | |
parent | d1da545a6881dbeafff86077f696f0dc22d3fc81 (diff) |
mime: drop internal FILE * support.
- The part kind MIMEKIND_FILE and associated code are suppressed.
- Seek data origin offset not used anymore: suppressed.
- MIMEKIND_NAMEDFILE renamed MIMEKIND_FILE; associated fields/functions
renamed accordingly.
- Curl_getformdata() processes stdin via a callback.
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_setopt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 635304a8f..a8e205938 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -432,7 +432,7 @@ static CURLcode libcurl_generate_mime(curl_mime *mime, int *mimeno) CODE2("part%d = curl_mime_addpart(mime%d);", *mimeno, *mimeno); filename = part->filename; switch(part->kind) { - case MIMEKIND_NAMEDFILE: + case MIMEKIND_FILE: Curl_safefree(escaped); escaped = c_escape(part->data, CURL_ZERO_TERMINATED); if(!escaped) @@ -483,8 +483,9 @@ static CURLcode libcurl_generate_mime(curl_mime *mime, int *mimeno) size = (cp == data + part->datasize)? (curl_off_t) -1: part->datasize; Curl_safefree(escaped); escaped = c_escape(data, (size_t) part->datasize); - if(data != part->data) - Curl_safefree(data); +#ifdef CURL_DOES_CONVERSIONS + Curl_safefree(data); +#endif if(!escaped) return CURLE_OUT_OF_MEMORY; if(size >= 0) |