Codebase list dillo / 16e9905
Prepare 3.0.2 RC1 package Axel Beckert 12 years ago
3 changed file(s) with 7 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
0 dillo (3.0.2~rc1-1) UNRELEASED; urgency=low
1
2 * New upstream bugfix release candidate
3 + Remove show-redirect-page-corvid.diff (applied upstream)
4
5 -- Axel Beckert <abe@debian.org> Fri, 02 Dec 2011 16:53:39 +0100
6
07 dillo (3.0.1-1) unstable; urgency=low
18
29 * New upstream bugfix release
+0
-1
debian/patches/series less more
0 show-redirect-page-corvid.diff
+0
-55
debian/patches/show-redirect-page-corvid.diff less more
0 Patch by corvid to address #642391. Source:
1 http://lists.auriga.wearlab.de/pipermail/dillo-dev/2011-September/008993.html
2
3 Index: dillo/src/cache.c
4 ===================================================================
5 --- dillo.orig/src/cache.c 2011-09-23 01:25:50.000000000 +0200
6 +++ dillo/src/cache.c 2011-09-23 01:44:20.000000000 +0200
7 @@ -678,24 +678,31 @@
8 if (header[9] == '3' && header[10] == '0') {
9 /* 30x: URL redirection */
10 if ((location_str = Cache_parse_field(header, "Location"))) {
11 - DilloUrl *location_url;
12 -
13 - entry->Flags |= CA_Redirect;
14 - if (header[11] == '1')
15 - entry->Flags |= CA_ForceRedirect; /* 301 Moved Permanently */
16 - else if (header[11] == '2')
17 - entry->Flags |= CA_TempRedirect; /* 302 Temporary Redirect */
18 -
19 - location_url = a_Url_new(location_str, URL_STR_(entry->Url));
20 - if (URL_FLAGS(location_url) & (URL_Post + URL_Get) &&
21 - dStrcasecmp(URL_SCHEME(location_url), "dpi") == 0 &&
22 - dStrcasecmp(URL_SCHEME(entry->Url), "dpi") != 0) {
23 - /* Forbid dpi GET and POST from non dpi-generated urls */
24 - MSG("Redirection Denied! '%s' -> '%s'\n",
25 - URL_STR(entry->Url), URL_STR(location_url));
26 + DilloUrl *location_url = a_Url_new(location_str,
27 + URL_STR_(entry->Url));
28 + if (prefs.filter_auto_requests == PREFS_FILTER_SAME_DOMAIN &&
29 + !a_Url_same_organization(entry->Url, location_url)) {
30 + /* don't redirect; just show body like usual (if any) */
31 + MSG("Redirection not followed from %s to %s\n",
32 + URL_HOST(entry->Url), URL_HOST(location_url));
33 a_Url_free(location_url);
34 } else {
35 - entry->Location = location_url;
36 + entry->Flags |= CA_Redirect;
37 + if (header[11] == '1')
38 + entry->Flags |= CA_ForceRedirect; /* 301 Moved Permanently */
39 + else if (header[11] == '2')
40 + entry->Flags |= CA_TempRedirect; /* 302 Temporary Redirect*/
41 +
42 + if (URL_FLAGS(location_url) & (URL_Post + URL_Get) &&
43 + dStrcasecmp(URL_SCHEME(location_url), "dpi") == 0 &&
44 + dStrcasecmp(URL_SCHEME(entry->Url), "dpi") != 0) {
45 + /* Forbid dpi GET and POST from non dpi-generated urls */
46 + MSG("Redirection Denied! '%s' -> '%s'\n",
47 + URL_STR(entry->Url), URL_STR(location_url));
48 + a_Url_free(location_url);
49 + } else {
50 + entry->Location = location_url;
51 + }
52 }
53 dFree(location_str);
54 }