diff --git a/include/ircd/rfc3986.h b/include/ircd/rfc3986.h index 9d907eb6a..35a04eb24 100644 --- a/include/ircd/rfc3986.h +++ b/include/ircd/rfc3986.h @@ -46,7 +46,7 @@ namespace ircd::rfc3986 // Decode percent-encoded strings. N.B. this decodes into any character // including control codes like %00 into '\0' etc. Use with caution. - const_buffer decode_unsafe(const mutable_buffer &, const string_view &url); + const_buffer decode_unsafe(const mutable_buffer &, const string_view &url) noexcept; // extractor suite uint16_t port(const string_view &remote); // get portnum from valid remote diff --git a/ircd/rfc3986.cc b/ircd/rfc3986.cc index 2d603087f..2f034cd3d 100644 --- a/ircd/rfc3986.cc +++ b/ircd/rfc3986.cc @@ -444,7 +444,7 @@ namespace ircd::rfc3986::parser::decoder const expr decode_char { - lit('%') > qi::int_parser{} + lit('%') >> qi::int_parser{} ,"url decodable character" }; @@ -479,6 +479,7 @@ namespace ircd::rfc3986::parser::decoder ircd::const_buffer ircd::rfc3986::decode_unsafe(const mutable_buffer &buf, const string_view &url) +noexcept { const char *start(url.data()), *const stop {