From a7a082d8d471bc38f9aa1160b0e9f8daf3d35ba3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 Oct 2025 14:26:40 +0100 Subject: Fix up QuotedString/CLFString parsing Refactors CLFString in terms of QuotedString, but with the optional of being null (nullopt) Moves the whole decode function into QuotedString's parser, fixing support for escaping of " which would otherwise prematurely end the string in the middle. --- src/logTypes.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/logTypes.hpp') diff --git a/src/logTypes.hpp b/src/logTypes.hpp index 7a78cc1..0262060 100644 --- a/src/logTypes.hpp +++ b/src/logTypes.hpp @@ -16,9 +16,9 @@ namespace WebStat { bool operator<=>(const QueryString &) const = default; }; - struct CLFString : std::optional { - using std::optional::optional; - using std::optional::operator=; + struct CLFString : std::optional { + using std::optional::optional; + using std::optional::operator=; bool operator<=>(const CLFString &) const = default; }; @@ -49,7 +49,5 @@ namespace scn { template<> struct scanner : scanner { static scan_expected scan(WebStat::CLFString & value, ContextType & ctx); - - static void decode(std::string &); }; } -- cgit v1.2.3