MCPcopy Create free account
hub / github.com/apache/brpc / ParseQueries

Function ParseQueries

src/brpc/uri.cpp:68–80  ·  view source on GitHub ↗

Parse queries, which is case-sensitive

Source from the content-addressed store, hash-verified

66
67// Parse queries, which is case-sensitive
68static void ParseQueries(URI::QueryMap& query_map, const std::string &query) {
69 query_map.clear();
70 if (query.empty()) {
71 return;
72 }
73 for (QuerySplitter sp(query.c_str()); sp; ++sp) {
74 if (!sp.key().empty()) {
75 std::string key(sp.key().data(), sp.key().size());
76 std::string value(sp.value().data(), sp.value().size());
77 query_map[key] = value;
78 }
79 }
80}
81
82inline const char* SplitHostAndPort(const char* host_begin,
83 const char* host_end,

Callers 1

InitializeQueryMapMethod · 0.85

Calls 7

clearMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45
keyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected