aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-02 14:48:27 -0800
committerFriendika <info@friendika.com>2011-02-02 14:48:27 -0800
commitee45dee9324be48cd87a883405bdd9e11e3f39f5 (patch)
treeae4588ffabf2c2099e705f049bbf80d5ec494774 /boot.php
parentfce9988f73ee8ad3624586e6866a68a2ae952ef8 (diff)
downloadvolse-hubzilla-ee45dee9324be48cd87a883405bdd9e11e3f39f5.tar.gz
volse-hubzilla-ee45dee9324be48cd87a883405bdd9e11e3f39f5.tar.bz2
volse-hubzilla-ee45dee9324be48cd87a883405bdd9e11e3f39f5.zip
suppress some scraping errors when confronted with hybrid/strange
feeds that provide insufficient content-type and choke the html parser.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index e47f1834d..0dd507168 100644
--- a/boot.php
+++ b/boot.php
@@ -1366,6 +1366,7 @@ function lrdd($uri) {
else {
$html = fetch_url($uri);
$headers = $a->get_curl_headers();
+ logger('lrdd: headers=' . $headers, LOGGER_DEBUG);
$lines = explode("\n",$headers);
if(count($lines)) {
foreach($lines as $line) {
@@ -1377,6 +1378,8 @@ function lrdd($uri) {
// don't try and run feeds through the html5 parser
if(stristr($line,'content-type:') && ((stristr($line,'application/atom+xml')) || (stristr($line,'application/rss+xml'))))
return array();
+ if(stristr($html,'<rss') || stristr($html,'<feed'))
+ return array();
}
}
if(! isset($link)) {