1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 01decoded_content_fallback.dpatch by Ralf Treinen <treinen@debian.org>
4
## DP: fallback for decoded_content when charset information is missing
5
## DP: Taken from the upstream svn repo, r234.
6
## DP: This patch should be obsolete for upstream version > 1.79
9
diff -urNad checkbot-1.79~/checkbot checkbot-1.79/checkbot
10
--- checkbot-1.79~/checkbot 2007-02-03 17:05:53.000000000 +0100
11
+++ checkbot-1.79/checkbot 2007-02-26 23:12:08.000000000 +0100
12
@@ -1177,7 +1177,12 @@
13
# in the response, otherwise we won't get the same behavior as
14
# browsers and miss things like a BASE url in pages.
15
my $p = HTML::LinkExtor->new(undef, $response->base);
16
- $p->parse($response->decoded_content);
18
+ # If charset information is missing then decoded_content doesn't
19
+ # work. Fall back to content in this case, even though that may lead
20
+ # to charset warnings. See bug 1665075 for reference.
21
+ my $content = $response->decoded_content || $response->content;
22
+ $p->parse($content);
25
# Deal with the links we found in this document