summaryrefslogtreecommitdiff
path: root/lib/mime.h
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix typos in commentsDaniel Gustafsson2019-03-221-1/+1
|
* mime: put the boundary buffer into the curl_mime structDaniel Stenberg2019-02-121-2/+5
| | | | | | | ... instead of allocating it separately and point to it. It is fixed-size and always used for each part. Closes #3561
* formdata: use the mime-content type functionDaniel Stenberg2018-02-051-0/+5
| | | | | | | | | | Reduce code duplication by making Curl_mime_contenttype available and used by the formdata function. This also makes the formdata function recognize a set of more file extensions by default. PR #2280 brought this to my attention. Closes #2282
* mime: clone mime tree upon easy handle duplication.Patrick Monnerat2018-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | A mime tree attached to an easy handle using CURLOPT_MIMEPOST is strongly bound to the handle: there is a pointer to the easy handle in each item of the mime tree and following the parent pointer list of mime items ends in a dummy part stored within the handle. Because of this binding, a mime tree cannot be shared between different easy handles, thus it needs to be cloned upon easy handle duplication. There is no way for the caller to get the duplicated mime tree handle: it is then set to be automatically destroyed upon freeing the new easy handle. New test 654 checks proper mime structure duplication/release. Add a warning note in curl_mime_data_cb() documentation about sharing user data between duplicated handles. Closes #2235
* mime: improve unbinding top multipart from easy handle.Patrick Monnerat2017-10-081-0/+2
| | | | Also avoid dangling pointers in referencing parts.
* form/mime: field names are not allowed to contain zero-valued bytes.Patrick Monnerat2017-09-221-1/+0
| | | | | Also suppress length argument of curl_mime_name() (names are always zero-terminated).
* mime: drop internal FILE * support.Patrick Monnerat2017-09-061-5/+2
| | | | | | | | - 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.
* mime: replace 'struct Curl_mimepart' by 'curl_mimepart' in encoder code.Patrick Monnerat2017-09-051-4/+4
| | | | mime_state is now a typedef.
* mime: implement encoders.Patrick Monnerat2017-09-051-1/+21
| | | | | | | | curl_mime_encoder() is operational and documented. curl tool -F option is extended with ";encoder=". curl tool --libcurl option generates calls to curl_mime_encoder(). New encoder tests 648 & 649. Test 1404 extended with an encoder specification.
* mime: unified to use the typedef'd mime structs everywhereDaniel Stenberg2017-09-051-35/+35
| | | | ... and slightly edited to follow our code style better.
* mime: new MIME API.Patrick Monnerat2017-09-021-0/+119
Available in HTTP, SMTP and IMAP. Deprecates the FORM API. See CURLOPT_MIMEPOST. Lib code and associated documentation.