more minor cookie issues
This commit is contained in:
parent
3e4e3248e7
commit
5f87b7e40f
|
|
@ -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] == '.'))) {
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue