22 #include <boost/regex.hpp> 29 const auto&
sub = m[idx];
37 "([a-zA-Z][a-zA-Z0-9+.-]*):" 41 static const boost::regex authorityAndPathRegex(
"//([^/]*)(/.*)?");
44 if (
UNLIKELY(!boost::regex_match(str.
begin(), str.
end(), match, uriRegex))) {
45 throw std::invalid_argument(to<std::string>(
"invalid URI ", str));
52 boost::cmatch authorityAndPathMatch;
53 if (!boost::regex_match(
54 authorityAndPath.begin(),
55 authorityAndPath.end(),
56 authorityAndPathMatch,
57 authorityAndPathRegex)) {
60 path_ = authorityAndPath.str();
63 "(?:([^@:]*)(?::([^@]*))?@)?" 64 "(\\[[^\\]]*\\]|[^\\[:]*)" 68 const auto authority = authorityAndPathMatch[1];
69 boost::cmatch authorityMatch;
70 if (!boost::regex_match(
75 throw std::invalid_argument(to<std::string>(
76 "invalid URI authority ",
88 host_ = submatch(authorityMatch, 3);
89 path_ = submatch(authorityAndPathMatch, 2);
92 query_ = submatch(match, 3);
106 result.push_back(
':');
110 result.push_back(
'@');
113 result.append(
host());
116 result.push_back(
':');
141 const boost::cregex_iterator paramBeginItr(
143 boost::cregex_iterator paramEndItr;
144 for (
auto itr = paramBeginItr; itr != paramEndItr; ++itr) {
145 if (itr->length(2) == 0) {
const std::string & password() const
const std::string & username() const
—— Concurrent Priority Queue Implementation ——
PUSHMI_INLINE_VAR constexpr detail::transform_fn transform
const std::string & host() const
constexpr auto size(C const &c) -> decltype(c.size())
constexpr bool empty() const
constexpr auto empty(C const &c) -> decltype(c.empty())
static map< string, int > m
void toAppend(char value, Tgt *result)
constexpr Iter end() const
constexpr Iter begin() const
std::string authority() const
std::vector< std::pair< std::string, std::string > > queryParams_
Range< const char * > StringPiece
const std::vector< std::pair< std::string, std::string > > & getQueryParams()
std::string hostname() const
constexpr detail::First first