From 5f2e4ff2c05f175738d7d8fdcfbd417faea231d0 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 3 Sep 2021 17:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhttp=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=9B=B8=E5=85=B3bug:#1083?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Parser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Common/Parser.cpp b/src/Common/Parser.cpp index 24a46deb..5a86caf7 100644 --- a/src/Common/Parser.cpp +++ b/src/Common/Parser.cpp @@ -139,6 +139,10 @@ StrCaseMap Parser::parseArgs(const string &str, const char *pair_delim, const ch StrCaseMap ret; auto arg_vec = split(str, pair_delim); for (string &key_val : arg_vec) { + if (key_val.empty()) { + //忽略 + continue; + } auto key = trim(FindField(key_val.data(), NULL, key_delim)); if (!key.empty()) { auto val = trim(FindField(key_val.data(), key_delim, NULL));