536e173728
The existing header parsing used C's tolower() function for case-insensitive switching over the first character of the header. However, that function's result depends on the current locale. Since the parser is supposed to match the likes of "If-Match" and "If-None-Match", matching may fail in locales, such as Turkish, where tolower(I) is ı (LATIN SMALL LETTER DOTLESS I) (or I, if the former isn't representable in the current charset), causing a False Negative. To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function, which has the added advantage that it's inline. Replace at(0) with front() as a drive-by. The WASM copy of the function is hopelessly outdated (recognizes less headers than the QNetworkRequest original). [ChangeLog][QtNetwork] Fixed a bug where certain QNetworkRequest::KnownHeaders wouldn't be recognized as such in certain locales. Pick-to: 6.4 6.2 5.15 Task-number: QTBUG-109235 Change-Id: Ib147ab64803bb868647dd07ad657d785071242ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |