diff options
author | corvid <corvid@lavabit.com> | 2010-04-20 18:52:43 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-04-20 18:52:43 +0000 |
commit | 0a052d108747ff051985f138f7c9787879c35517 (patch) | |
tree | 387811775189b4432d404d966fd83266007a554c /src | |
parent | bda22922f7ed5934a2c1cd9740836df1a22cbc30 (diff) |
allow image/stylesheet redirection if using filter
Diffstat (limited to 'src')
-rw-r--r-- | src/cache.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/cache.c b/src/cache.c index fcd27a05..ec6ccf14 100644 --- a/src/cache.c +++ b/src/cache.c @@ -936,20 +936,16 @@ static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw) URL_STR_(entry->Url), URL_STR_(entry->Location)); _MSG("%s", entry->Header->str); - if (Flags & WEB_RootUrl) { - /* Redirection of the main page */ + if ((Flags & WEB_RootUrl) || + (prefs.filter_auto_requests == PREFS_FILTER_SAME_DOMAIN)) { + /* Follow redirection for the main page unconditionally. For images + * and stylesheets, follow if the request will go through filtering. + */ NewUrl = a_Url_new(URL_STR_(entry->Location), URL_STR_(entry->Url)); if (entry->Flags & CA_TempRedirect) a_Url_set_flags(NewUrl, URL_FLAGS(NewUrl) | URL_E2EQuery); a_Nav_push(bw, NewUrl, entry->Url); a_Url_free(NewUrl); - } else { - /* Sub entity redirection (most probably an image) */ - if (!entry->Data->len) { - _MSG(">>>Image redirection without entity-content<<<\n"); - } else { - _MSG(">>>Image redirection with entity-content<<<\n"); - } } } return 0; |