changeset 1666:6beaa7ebc4a8

back out cef38874b78f Surprising that it took a week for me to notice anything was wrong.
author corvid <corvid@lavabit.com>
date Tue, 27 Apr 2010 01:03:27 +0000
parents 3e804040cb31
children 7ee5774a0601
files src/cache.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/cache.c	Sun Apr 25 23:33:58 2010 +0200
+++ b/src/cache.c	Tue Apr 27 01:03:27 2010 +0000
@@ -936,16 +936,20 @@
            URL_STR_(entry->Url), URL_STR_(entry->Location));
       _MSG("%s", entry->Header->str);
 
-      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.
-          */
+      if (Flags & WEB_RootUrl) {
+         /* Redirection of the main page */
          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;