mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
完善key-value解析代码
This commit is contained in:
parent
246f446142
commit
c2bf2928d0
@ -148,9 +148,12 @@ StrCaseMap Parser::parseArgs(const string &str, const char *pair_delim, const ch
|
|||||||
auto val = trim(FindField(key_val.data(), key_delim, NULL));
|
auto val = trim(FindField(key_val.data(), key_delim, NULL));
|
||||||
ret.emplace_force(key, val);
|
ret.emplace_force(key, val);
|
||||||
} else {
|
} else {
|
||||||
|
trim(key_val);
|
||||||
|
if (!key_val.empty()) {
|
||||||
ret.emplace_force(key_val, "");
|
ret.emplace_force(key_val, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user