From 75a5d6d58637ef047b9a018e9a43af740a8a4c82 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Wed, 22 May 2024 20:32:46 +0200 Subject: [PATCH] wip --- src/server/api/url_parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/api/url_parser.cpp b/src/server/api/url_parser.cpp index d217a3bcc..19f1574c6 100644 --- a/src/server/api/url_parser.cpp +++ b/src/server/api/url_parser.cpp @@ -56,8 +56,11 @@ boost::optional parseURL(std::string::iterator &iter, const std::stri return boost::make_optional(out); } } - catch (const x3::expectation_failure &) + catch (const x3::expectation_failure &failure) { + // The grammar above using expectation parsers ">" does not automatically increment the + // iterator to the failing position. Extract the position from the exception ourselves. + iter = failure.where(); } return boost::none;