qt6-bb10/tests/auto/corelib
Marc Mutz d743fd0d0a 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>
2022-03-11 19:15:49 +00:00
..
animation tst_qanimationgroup: fix memleaks 2022-01-05 08:22:00 +01:00
global tst_qflags: test w/and w/o QT_TYPESAFE_FLAGS 2022-03-08 11:16:19 +01:00
io qDecodeDataUrl(): treat ";base64" marker as case-insensitive 2022-03-11 19:15:49 +00:00
itemmodels Fix test to pass with QT_FORCE_ASSERTS 2022-02-18 18:55:38 +01:00
kernel Blacklist: test cases blacklisted in tst_QSystemSemaphore: 2022-03-10 08:18:42 +00:00
mimetypes Remove unused .qrc files 2022-01-17 23:17:01 +01:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Fix test when accessing patched plugin too fast 2022-02-25 14:52:34 +02:00
serialization Activate tst_qxmlstream for Android 2022-03-02 14:55:00 +01:00
text Add an overload of QStringView::count() for QLatin1String 2022-03-09 15:58:47 +01:00
thread Core: Fix tests that did break because QProcess security fix 2022-02-24 09:49:52 +02:00
time Add tests for an assertion seen on Windows 2022-03-04 23:26:13 +01:00
tools tst_qflatmap: fix -Wunused-local-typedef (Clang) 2022-03-11 19:15:49 +00:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00