修复bug

This commit is contained in:
xiongziliang 2018-08-04 23:59:03 +08:00
parent efdc740fb4
commit 5c8914e109
2 changed files with 4 additions and 6 deletions

@ -1 +1 @@
Subproject commit e4b5f7f0495d338fd03924850a45a16a797c4673
Subproject commit 9e0819d36e1f8b85fbd12d6c6c2286178ea96b91

View File

@ -174,15 +174,13 @@ public:
return m_mapUrlArgs;
}
static StrCaseMap parseArgs(const string &str,const char *pair_delim = "&", const char *key_delim = "="){
StrCaseMap ret;
auto arg_vec = split(str, pair_delim);
for (string &key_val : arg_vec) {
auto key_val_vec = split(key_val, key_delim);
if (key_val_vec.size() >= 2) {
ret[key_val_vec[0]] = key_val_vec[1];
}
auto key = FindField(key_val.data(),NULL,key_delim);
auto val = FindField(key_val.data(),key_delim, NULL);
ret[key] = val;
}
return ret;
}