From 6e7893c8489b6bd100699edfc480d95afda66bc1 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 20 Jul 2007 13:49:32 +0000 Subject: [PATCH] 2007-07-20 Tatsuhiro Tsujikawa Fixed the bug that prevents cookies from being sent to the server if the domain of cookie is FQDN and starts with ".". * src/Cookie.cc (match) --- ChangeLog | 6 ++++++ src/Cookie.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 44738b04..fc496b8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-20 Tatsuhiro Tsujikawa + + Fixed the bug that prevents cookies from being sent to the server + if the domain of cookie is FQDN and starts with ".". + * src/Cookie.cc (match) + 2007-07-18 Tatsuhiro Tsujikawa Fixed the bug that prevents filename in content-disposition from diff --git a/src/Cookie.cc b/src/Cookie.cc index 0e86f41a..951648af 100644 --- a/src/Cookie.cc +++ b/src/Cookie.cc @@ -38,7 +38,7 @@ bool Cookie::match(const string& host, const string& dir, time_t date, bool secure) const { if((secure || !this->secure && !secure) && - Util::endsWith(host, this->domain) && + Util::endsWith("."+host, this->domain) && Util::startsWith(dir, this->path) && (this->onetime || date < this->expires)) { return true;