Commit 4b1547adc9 rewrote the latter for
simplicity and performance, so copy it over with intent to merging the
two together. In this copy, however, we keep the behavior introduced by
commit eaf4438b35, which made the
normalization match the behavior found in browsers, but didn't apply to
QUrl::resolved (that's the next commit)
Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I2670423f6c6a5339771ffffdf15ebad46fd25cb4
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 78e2d24752)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>