only correct cookies if the expires time is non-zero.

(zero means the cookie should expire at the end of the current session.)
fix by=morse, r=sspitzer, part of bug #15111
This commit is contained in:
sspitzer%netscape.com 1999-12-06 21:25:01 +00:00
Родитель e55d8458f0
Коммит 9459932322
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1452,7 +1452,12 @@ Fix4xCookies(nsIFileSpec * profilePath) {
unsigned long expires = strtoul(expiresCString, nsnull, 10);
nsCRT::free(expiresCString);
/* if the cookie is supposed to expire at the end of the session
* expires == 0. don't adjust those cookies.
*/
if (expires) {
expires -= SECONDS_BETWEEN_1900_AND_1970;
}
char dateString[36];
PR_snprintf(dateString, sizeof(dateString), "%lu", expires);