aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/url-parts.hh
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane@hufschmitt.net>2022-04-07 21:09:39 +0200
committerThéophane Hufschmitt <theophane@hufschmitt.net>2022-04-08 16:09:49 +0200
commitf3d3587ab39130e8d87d290b8cedabb3e6e9d715 (patch)
treec4cd93ceffa59be8f95b6b2d9f6d8fe88f069d99 /src/libutil/url-parts.hh
parent8b1e328d5d0ae7d3a4a8f6012ec065b59674ed4a (diff)
Allow empty path segments in urls
Valid per https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 (and also somewhat frequently happening for local paths)
Diffstat (limited to 'src/libutil/url-parts.hh')
-rw-r--r--src/libutil/url-parts.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/url-parts.hh b/src/libutil/url-parts.hh
index da10a6bbc..d5e6a2736 100644
--- a/src/libutil/url-parts.hh
+++ b/src/libutil/url-parts.hh
@@ -18,7 +18,7 @@ const static std::string userRegex = "(?:(?:" + unreservedRegex + "|" + pctEncod
const static std::string authorityRegex = "(?:" + userRegex + "@)?" + hostRegex + "(?::[0-9]+)?";
const static std::string pcharRegex = "(?:" + unreservedRegex + "|" + pctEncoded + "|" + subdelimsRegex + "|[:@])";
const static std::string queryRegex = "(?:" + pcharRegex + "|[/? \"])*";
-const static std::string segmentRegex = "(?:" + pcharRegex + "+)";
+const static std::string segmentRegex = "(?:" + pcharRegex + "*)";
const static std::string absPathRegex = "(?:(?:/" + segmentRegex + ")*/?)";
const static std::string pathRegex = "(?:" + segmentRegex + "(?:/" + segmentRegex + ")*/?)";