summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginHelpers.cmake
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-03-09 14:21:36 +0100
committerThiago Macieira <thiago.macieira@intel.com>2022-03-11 19:15:49 +0000
commitd743fd0d0a0387d4435dd8d35f57023492a6d54b (patch)
treed54ec7866b7e34a53191f347902d56c346c4d524 /cmake/QtPluginHelpers.cmake
parentcfa4879b41a786f5493ff73c59d55c65334856d8 (diff)
qDecodeDataUrl(): treat ";base64" marker as case-insensitive
RFC2397 doesn't explicitly mention it, but references RFC2045, which, in Section 2, states: > All media type values, subtype values, and parameter names as > defined are case-insensitive. and goes on, in 6.1: > mechanism := "7bit" / "8bit" / "binary" / > "quoted-printable" / "base64" / > ietf-token / x-token > > These values are not case sensitive So regardless of whether "base64" is a parameter name, or a mechanism, we need to treat it case-insensitively. Use QLatin1String::endsWith() instead of QByteArray::endsWith(), because the former takes Qt::CaseInsensitive while the latter would need a toLower(). Add a test. As a drive-by, use the same trick for the existing case-insensitive comparison with "charset". As a further drive-by, fix inappropriate uses of QLatin1String (= where they don't prevent allocations). [ChangeLog][QtCore][QUrl] Now recognizes the ";base64" marker in "data:" URLs case-insensitively. Pick-to: 6.3 6.2 Change-Id: Ife6ba771553aaad3b7c119c1fa631f41ffa8f590 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake/QtPluginHelpers.cmake')
0 files changed, 0 insertions, 0 deletions