mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
fix bug 14145, approved chofmann
This commit is contained in:
parent
53e8731812
commit
59f703061c
@ -1664,7 +1664,11 @@ COOKIE_SetCookieStringFromHttp(char * curURL, char * setCookieHeader, char * ser
|
||||
expires = cookie_ParseDate(date);
|
||||
*ptr=origLast;
|
||||
}
|
||||
sDate = cookie_ParseDate(server_date);
|
||||
if (server_date) {
|
||||
sDate = cookie_ParseDate(server_date);
|
||||
} else {
|
||||
sDate = time(NULL);
|
||||
}
|
||||
if( sDate && expires ) {
|
||||
if( expires < sDate ) {
|
||||
gmtCookieExpires=1;
|
||||
@ -2192,9 +2196,11 @@ COOKIE_CookieViewerReturn(nsAutoString results) {
|
||||
cookie = NS_STATIC_CAST(cookie_CookieStruct*, cookie_cookieList->ElementAt(count));
|
||||
if (cookie && cookie_InSequence(gone, count)) {
|
||||
cookie_FreeCookie(cookie);
|
||||
cookie_cookiesChanged = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
cookie_SaveCookies();
|
||||
cookie_UnlockCookieList();
|
||||
nsCRT::free(gone);
|
||||
|
||||
|
@ -176,8 +176,8 @@ nsCookieHTTPNotify::AsyncExamineResponse(nsISupports *aContext) {
|
||||
rv = pHTTPConnection->GetResponseHeader(header, &pDate);
|
||||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
COOKIE_SetCookieStringFromHttp((char*)(const char*)url, cookie, pDate);
|
||||
if(pDate) {
|
||||
COOKIE_SetCookieStringFromHttp((char*)(const char*)url, cookie, pDate);
|
||||
nsCRT::free(pDate);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user