Fix parsing of URI paths in hosts string

Summary: Fixes #31

Reviewers: ivica

Reviewed By: ivica

Subscribers: korina, miljen

Differential Revision: https://repo.mireo.local/D35126
This commit is contained in:
Bruno Iljazovic
2025-05-06 09:54:40 +02:00
parent 5375062894
commit 14bca520d9
2 changed files with 135 additions and 2 deletions

View File

@ -215,8 +215,8 @@ public:
auto host_ = as_<std::string>(+unreserved_)[to_(host)];
auto port_ = as_<std::string>(':' >> +digit_)[to_(port)];
auto path_ = as_<std::string>(x3::char_('/') >> *unreserved_)[to_(path)];
auto uri_ = *x3::omit[x3::space] >> (host_ >> *port_ >> *path_) >>
auto path_ = as_<std::string>(+(x3::char_('/') >> *unreserved_))[to_(path)];
auto uri_ = *x3::omit[x3::space] >> (host_ >> -port_ >> -path_) >>
(*x3::omit[x3::space] >> x3::omit[separator_ | x3::eoi]);
for (auto b = hosts.begin(); b != hosts.end(); ) {