diff options
author | regnat <rg@regnat.ovh> | 2020-09-11 14:07:02 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-09-16 13:53:09 +0200 |
commit | d65962db4d5c1a2c8f456e3ae6bb789eb3a1e744 (patch) | |
tree | 356a39fa24f7e1829ac40c3d98fe21b414db74e7 /src | |
parent | 29a632386e358b8cd72cf0545917e324bcfba16e (diff) |
Make uri schemes grammar more RFC-compliant
Allow `-` and `.` in the RFC schemes as stated by
[RFC3986](https://tools.ietf.org/html/rfc3986#section-3.1).
Practically, this is needed so that `ssh-ng` is a valid URI scheme
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/url.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/url.hh b/src/libutil/url.hh index 2ef88ef2a..1f716ba10 100644 --- a/src/libutil/url.hh +++ b/src/libutil/url.hh @@ -31,7 +31,7 @@ ParsedURL parseURL(const std::string & url); // URI stuff. const static std::string pctEncoded = "(?:%[0-9a-fA-F][0-9a-fA-F])"; -const static std::string schemeRegex = "(?:[a-z+]+)"; +const static std::string schemeRegex = "(?:[a-z+.-]+)"; const static std::string ipv6AddressRegex = "(?:\\[[0-9a-fA-F:]+\\])"; const static std::string unreservedRegex = "(?:[a-zA-Z0-9-._~])"; const static std::string subdelimsRegex = "(?:[!$&'\"()*+,;=])"; |