Ignore meta refresh values that supply negative numbers. b=149543 r=alecf@netscape.com sr=bzbarsky@mit.edu

This commit is contained in:
locka%iol.ie 2003-04-04 11:45:53 +00:00
Родитель c3d25f959e
Коммит 2e2c7eaef0
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -3985,9 +3985,10 @@ nsDocShell::SetupRefreshURIFromHeader(nsIURI * aBaseURI,
nsIScriptSecurityManager::
DISALLOW_FROM_MAIL);
if (NS_SUCCEEDED(rv)) {
// since we can't travel back in time yet, just pretend it was meant figuratively
// Since we can't travel back in time yet, just pretend
// negative numbers do nothing at all.
if (seconds < 0)
seconds = 0;
return NS_ERROR_FAILURE;
rv = RefreshURI(uri, seconds * 1000, PR_FALSE, PR_TRUE);
}