From ec79c838639b74f23c8d836368b08642ea8b4940 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 29 Apr 2006 17:58:05 +0200 Subject: Feedfetcher/HTTPClient fix This fixes a typo which made the new Feedparser not use our own HTTPClient. It also enhances the get() method of HTTPClient to optionally cope better with bad HTTP responses: Some servers return a body with a "304 Not Modified" status which violates RFC 2616 but is usually accepted by common browsers. Setting the $sloppy304 parameter will return the response body. This fixes problems with feeds from feedblendr.com darcs-hash:20060429155805-7ad00-33a1c3142f241bf7747e8f679237cb6e8f1564ef.gz --- inc/FeedParser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc/FeedParser.php') diff --git a/inc/FeedParser.php b/inc/FeedParser.php index f2aeb4e7b..7c0071af0 100644 --- a/inc/FeedParser.php +++ b/inc/FeedParser.php @@ -25,9 +25,11 @@ class FeedParser extends SimplePie { /** * Fetch an URL using our own HTTPClient + * + * Overrides SimplePie's own method */ - function getFile($url){ + function get_file($url){ $http = new DokuHTTPClient(); - return $http->get($url); + return $http->get($url,true); } } -- cgit v1.2.3