Skip to content
Snippets Groups Projects
Commit 1152b245 authored by fox's avatar fox
Browse files

Merge pull request 'Fix xml parsing error' (#70) from Sie/tt-rss:parsing-fix into master

parents 659ad853 3406a160
No related branches found
No related tags found
No related merge requests found
...@@ -394,6 +394,11 @@ class UrlHelper { ...@@ -394,6 +394,11 @@ class UrlHelper {
$ret = @curl_exec($ch); $ret = @curl_exec($ch);
if (curl_errno($ch) === 23 || curl_errno($ch) === 61) {
curl_setopt($ch, CURLOPT_ENCODING, 'none');
$ret = @curl_exec($ch);
}
$headers_length = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $headers_length = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = explode("\r\n", substr($ret, 0, $headers_length)); $headers = explode("\r\n", substr($ret, 0, $headers_length));
$contents = substr($ret, $headers_length); $contents = substr($ret, $headers_length);
...@@ -413,11 +418,6 @@ class UrlHelper { ...@@ -413,11 +418,6 @@ class UrlHelper {
} }
} }
if (curl_errno($ch) === 23 || curl_errno($ch) === 61) {
curl_setopt($ch, CURLOPT_ENCODING, 'none');
$contents = @curl_exec($ch);
}
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
self::$fetch_last_content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); self::$fetch_last_content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment