more minor cookie issues

This commit is contained in:
David Rose 2007-10-04 00:23:55 +00:00
parent 3e4e3248e7
commit 5f87b7e40f
2 changed files with 7 additions and 0 deletions

View File

@ -130,6 +130,7 @@ matches_url(const URLSpec &url) const {
}
string server = url.get_server();
if (server == _domain ||
(string(".") + server) == _domain ||
(server.length() > _domain.length() &&
server.substr(server.length() - _domain.length()) == _domain &&
(_domain[0] == '.' || server[server.length() - _domain.length() - 1] == '.'))) {

View File

@ -214,6 +214,11 @@ HTTPDate(const string &format) {
}
// Everything checks out; convert the date.
#ifdef __GNUC__
_time = timegm(&t);
#else // __GNUC__
// Without the GNU extension timegm, we have to use mktime() instead.
_time = mktime(&t);
if (_time != (time_t)-1) {
@ -222,6 +227,7 @@ HTTPDate(const string &format) {
extern long int timezone;
_time -= timezone;
}
#endif // __GNUC__
}
////////////////////////////////////////////////////////////////////