Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionMimeOptions
Set MIME option flags.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.SetOptionMimeOptions"; curl; value ) More
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
value | The new mime options. |
Result
Returns OK or error.
Description
Set MIME option flags.Pass a number that holds a bitmask of CURLMIMEOPT constants. Each bit is a Boolean flag used while encoding a MIME tree or multipart form data.
Available bits are:
CURLMIMEOPT_FORMESCAPE = 1
Tells libcurl to escape multipart form field and file names using the backslash-escaping algorithm rather than percent-encoding (HTTP only).
Backslash-escaping consists in preceding backslashes and double quotes with a backslash. Percent encoding maps all occurrences of double quote, carriage return and line feed to %22, %0D and %0A respectively.
Before version 7.81.0, percent-encoding was never applied.
HTTP browsers used to do backslash-escaping in the past but have over time transitioned to use percent-encoding. This option allows to address server-side applications that have not yet have been converted.
As an example, consider field or file name strange\name"kind. When the containing multipart form is sent, this is normally transmitted as strange\name%22kind. When this option is set, it is sent as strange\\name\"kind.
See also MIME_OPTIONS option in CURL manual.
See also
- CURL.GetOptionTelnetOptions
- CURL.SetOptionHeaderOptions
- CURL.SetOptionLoginOptions
- CURL.SetOptionSSLOptions
- CURL.SetOptionTelnetOptions
- CURL.SetOptionTFTPNoOptions
- CURL.SetOptionTimeCondition
- CURL.SetOptionTimeOut
Release notes
- Version 12.4
- Added CURL.SetOptionMaxLifeTimeConnection, CURL.SetOptionMimeOptions and CURL.SetOptionSSHHostPublicKeySHA256 functions.
Blog Entries
Created 22nd August 2022, last changed 22nd August 2022