You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a DataPart object, $encoding parameter is limited to 'quoted-printable', 'base64' or '8bit' by this code in TextPart.php:
if ('quoted-printable' !== $encoding && 'base64' !== $encoding && '8bit' !== $encoding) {
throw new InvalidArgumentException(sprintf('The encoding must be one of "quoted-printable", "base64", or "8bit" ("%s" given).', $encoding));
}
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.4.17
Description
When creating a DataPart object, $encoding parameter is limited to 'quoted-printable', 'base64' or '8bit' by this code in TextPart.php:
We are missing the possiblity to set a binary encoding to create OData batch request, as each part must have a binary encoding (https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398359) :
A MIME part representing an individual request MUST include a Content-Type header with value application/http and a Content-Transfer-Encoding header with value binary.
From MIME RFC1341 (https://www.w3.org/Protocols/rfc1341/5_Content-Transfer-Encoding.html) it seems binary is just like 8bit, but without any line-length limit.
How to reproduce
throws the above exception
Possible Solution
Maybe it's possible to treat "binary" as an alias of "8bit"
Additional Context
No response
The text was updated successfully, but these errors were encountered: