Support feeds without XML headers

This commit is contained in:
Matthew Exon 2015-02-03 02:30:03 +01:00 committed by Matthew Exon
parent d10c8ddf57
commit 1c31dca5d6

View file

@ -174,7 +174,7 @@ function onepoll_run(&$argv, &$argc){
return;
}
if(! strstr($handshake_xml,'<?xml')) {
if(! strstr($handshake_xml,'<')) {
logger('poller: response from ' . $url . ' did not contain XML.');
mark_for_death($contact);
@ -535,7 +535,7 @@ function onepoll_run(&$argv, &$argc){
if($xml) {
logger('poller: received xml : ' . $xml, LOGGER_DATA);
if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
if(! strstr($xml,'<')) {
logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
$r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),