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__ } ////////////////////////////////////////////////////////////////////