Changeset 4389
- Timestamp:
- 10/13/2006 09:51:34 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/simplepie.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/simplepie.php
r4377 r4389 6 6 7 7 Version: "Lemon Meringue" 8 Updated: 1 0October 20068 Updated: 13 October 2006 9 9 Copyright: 2004-2006 Ryan Parman, Geoffrey Sneddon 10 10 http://simplepie.org … … 27 27 var $name = 'SimplePie'; 28 28 var $version = 'Lemon Meringue'; 29 var $build = '2006101 0';29 var $build = '20061013'; 30 30 var $url = 'http://simplepie.org/'; 31 31 var $useragent; … … 408 408 409 409 // Check if the supplied URL is a feed, if it isn't, look for it. 410 if (!call_user_func(array($this->locator_class, 'is_feed'), $file))411 {412 $locate = new $this->locator_class($file, $this->timeout, $this->useragent);410 $locate = new $this->locator_class($file, $this->timeout, $this->useragent); 411 if (!$locate->is_feed($file)) 412 { 413 413 $feed = $locate->find(); 414 414 if ($feed) … … 2186 2186 $info = stream_get_meta_data($this->fp); 2187 2187 $data = ''; 2188 while (strpos($data, "\r\n\r\n") === false && $info['timed_out'] === false)2188 while (strpos($data, "\r\n\r\n") === false && !$info['timed_out']) 2189 2189 { 2190 2190 $data .= fgets($this->fp, 128); 2191 2191 $info = stream_get_meta_data($this->fp); 2192 2192 } 2193 if ( $info['timed_out'] === false)2193 if (!$info['timed_out']) 2194 2194 { 2195 2195 $this->headers = $this->parse_headers($data); … … 2238 2238 if ($this->fp) 2239 2239 { 2240 $info = stream_get_meta_data($this->fp); 2240 2241 $this->body = ''; 2241 while (! feof($this->fp))2242 while (!$info['eof'] && !$info['timed_out']) 2242 2243 { 2243 2244 $this->body .= fread($this->fp, 1024); 2244 } 2245 $this->body = trim($this->body); 2246 if ($this->method == 'fsockopen' && !empty($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') 2247 { 2248 $this->body = substr($this->body, 10); 2249 $this->body = gzinflate($this->body); 2250 } 2251 $this->close(); 2245 $info = stream_get_meta_data($this->fp); 2246 } 2247 if (!$info['timed_out']) 2248 { 2249 $this->body = trim($this->body); 2250 if ($this->method == 'fsockopen' && !empty($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') 2251 { 2252 $this->body = substr($this->body, 10); 2253 $this->body = gzinflate($this->body); 2254 } 2255 $this->close(); 2256 } 2257 else 2258 { 2259 return false; 2260 } 2252 2261 } 2253 2262 else
Note: See TracChangeset
for help on using the changeset viewer.