diff --git a/http/HttpMessage.cpp b/http/HttpMessage.cpp index 4d47dff64..9d46b0e92 100644 --- a/http/HttpMessage.cpp +++ b/http/HttpMessage.cpp @@ -466,6 +466,12 @@ const HttpCookie& HttpMessage::GetCookie(const std::string& name) { if (iter->name == name) { return *iter; } + auto kv_iter = iter->kv.find(name); + if (kv_iter != iter->kv.end()) { + iter->name = name; + iter->value = kv_iter->second; + return *iter; + } } return NoCookie; }