qt5base-lts/tests/auto/corelib/io
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
..
largefile QNX: Limit maximum largefile size 2021-12-12 13:12:01 +02:00
qabstractfileengine Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qbuffer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdataurl qDecodeDataUrl(): treat ";base64" marker as case-insensitive 2022-03-11 19:15:49 +00:00
qdebug Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdir Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qdiriterator Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfile Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfileinfo Add QFileInfo::isAlias() to reflect whether the file is a macOS alias 2022-03-06 18:46:54 +01:00
qfileselector CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
qfilesystementry CMake: Remove the usage of QT_SOURCE_TREE from tests 2021-07-12 18:56:14 +02:00
qfilesystemmetadata Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfilesystemwatcher Blacklist tst_QFileSystemWatcher::signalsEmittedAfterFileMoved on all Windows versions 2022-01-31 17:39:33 +01:00
qiodevice Cleanup tests that add test data to resources explicitly 2022-02-11 21:54:44 +01:00
qipaddress Disable security warnings from MSVC in tests 2021-03-17 17:22:00 +01:00
qlockfile Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qloggingcategory Remove the qmake project files 2021-01-07 15:32:28 +01:00
qloggingregistry Cleanup tests that add test data to resources explicitly 2022-02-11 21:54:44 +01:00
qnodebug Remove the qmake project files 2021-01-07 15:32:28 +01:00
qprocess QProcess/Unix: ensure we don't accidentally execute something from CWD 2022-02-09 11:26:32 -08:00
qprocess-noapplication Remove the qmake project files 2021-01-07 15:32:28 +01:00
qprocessenvironment QProcess: Distinguish between null and empty QProcessEnvironment 2021-11-07 01:53:44 +01:00
qresourceengine tst_qresourceengine: use QFINDTESTDATA() to find correct path 2022-02-04 11:02:07 +02:00
qsavefile QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
qsettings Do not assume implicit string-ish → QColor conversion 2022-03-11 20:15:49 +01:00
qstandardpaths Fix autotest public API compilation for INTEGRITY 2021-10-15 11:00:25 +03:00
qstorageinfo Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtemporarydir QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
qtemporaryfile Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qurl Workaround MSVC 2022 bug about QString::replace 2021-11-10 14:10:20 +01:00
qurlinternal tst_qurl{,internal}: Use U+FB01 for normalization to ASCII test cases 2021-08-25 00:13:39 +02:00
qurlquery tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
qurluts46 Update UCD to Revision 28 2021-10-18 16:45:10 +00:00
CMakeLists.txt Exclude filesystem autotests for INTEGRITY 2021-12-30 15:38:14 +00:00