summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_activex_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r--chrome_frame/chrome_frame_activex_base.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 077fa11..a7fd6a0 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -42,6 +42,7 @@
#include "chrome_frame/com_type_info_holder.h"
#include "chrome_frame/urlmon_url_request.h"
#include "grit/generated_resources.h"
+#include "net/base/cookie_monster.h"
// Include without path to make GYP build see it.
#include "chrome_tab.h" // NOLINT
@@ -523,10 +524,17 @@ END_MSG_MAP()
const std::string& cookie) {
std::string name;
std::string data;
+
size_t name_end = cookie.find('=');
if (std::string::npos != name_end) {
- name = cookie.substr(0, name_end);
- data = cookie.substr(name_end + 1);
+ net::CookieMonster::ParsedCookie parsed_cookie = cookie;
+ name = parsed_cookie.Name();
+ // Verify if the cookie is being deleted. The cookie format is as below
+ // value[; expires=date][; domain=domain][; path=path][; secure]
+ // If the first semicolon appears immediately after the name= string,
+ // it means that the cookie is being deleted.
+ if (!parsed_cookie.Value().empty())
+ data = cookie.substr(name_end + 1);
} else {
data = cookie;
}