Treat short meta refreshes in top-level browser windows as if they were HTTP redirects for the purposes of verifiability.

svn path=/trunk/netsurf/; revision=6751
This commit is contained in:
John Mark Bell 2009-03-10 09:10:43 +00:00
parent 502879043b
commit 2ace72c587

View File

@ -693,8 +693,23 @@ void browser_window_refresh(void *p)
bw->current_content->refresh)))
history_add = false;
browser_window_go_unverifiable(bw, bw->current_content->refresh,
bw->current_content->url, history_add);
LOG(("Refresh: %d", bw->refresh_interval));
/* Treat an (almost) immediate refresh in a top-level browser window as
* if it were an HTTP redirect, and thus make the resulting fetch
* verifiable.
*
* See fetchcache.c for why redirected fetches should be verifiable at
* all.
*/
if (bw->refresh_interval <= 100 &&
bw->browser_window_type == BROWSER_WINDOW_NORMAL) {
browser_window_go(bw, bw->current_content->refresh,
bw->current_content->url, history_add);
} else {
browser_window_go_unverifiable(bw, bw->current_content->refresh,
bw->current_content->url, history_add);
}
}