From: Friendika Date: Wed, 2 Feb 2011 22:48:27 +0000 (-0800) Subject: suppress some scraping errors when confronted with hybrid/strange X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ee45dee9324be48cd87a883405bdd9e11e3f39f5;p=friendica.git suppress some scraping errors when confronted with hybrid/strange feeds that provide insufficient content-type and choke the html parser. --- diff --git a/boot.php b/boot.php index e47f1834d8..0dd5071685 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,'