From 5f87b7e40f23304f1b9346a3e596354fe867ffcf Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 4 Oct 2007 00:23:55 +0000 Subject: [PATCH] more minor cookie issues --- panda/src/downloader/httpCookie.cxx | 1 + panda/src/downloader/httpDate.cxx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/panda/src/downloader/httpCookie.cxx b/panda/src/downloader/httpCookie.cxx index 3777273e25..978149b8d2 100644 --- a/panda/src/downloader/httpCookie.cxx +++ b/panda/src/downloader/httpCookie.cxx @@ -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] == '.'))) { diff --git a/panda/src/downloader/httpDate.cxx b/panda/src/downloader/httpDate.cxx index b614cf81fb..3d78952ee4 100644 --- a/panda/src/downloader/httpDate.cxx +++ b/panda/src/downloader/httpDate.cxx @@ -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__ } ////////////////////////////////////////////////////////////////////