qt6-bb10/tests/auto/network/access/qrestaccessmanager
Marc Mutz 98b034e53a QRestReply: make charset parsing more robust
The old code was based on QString::split and e.g. didn't handle
escapes in quoted-strings.

Write a modern recursive-descent parser to parse out type/subtype and
charset parameter. Since we don't, yet, support CFWS (see below),
recursion depth is strictly limited, so we're not susceptible to
recursion bombs here.

It currently handles only RFC9110-style grammar, but can be easily
extended to support CFWS (RFC2822-style comments and folding
white-space) or RFC2231-style continuuations, if needed.

It's a bit more general than strictly required, because I expect this
to be reused elsewhere ere long.

Pick-to: 6.7
Fixes: QTBUG-120307
Change-Id: I309928dc350a043672dffb4a259b457764c031be
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-04-26 02:24:53 +02:00
..
CMakeLists.txt CMake: Make a few more auto tests standalone 2024-03-14 01:14:18 +01:00
httptestserver.cpp HttpTestServer: pass std::function by value and move into place 2024-04-18 19:06:02 +02:00
httptestserver_p.h HttpTestServer: pass std::function by value and move into place 2024-04-18 19:06:02 +02:00
tst_qrestaccessmanager.cpp QRestReply: make charset parsing more robust 2024-04-26 02:24:53 +02:00