diff options
author | fox <[email protected]> | 2022-05-22 12:34:45 +0300 |
---|---|---|
committer | fox <[email protected]> | 2022-05-22 12:34:45 +0300 |
commit | 1152b2454ea47acc328691c7fc8aaa2f74760ccc (patch) | |
tree | f3f46d64c59d052cdbb2f4d3ac62e8808a99b686 /classes/urlhelper.php | |
parent | 659ad8537aea6681d27b2c87aa87aabfdfe67664 (diff) | |
parent | 3406a16025883ef43f41480885c099fd0ce91c99 (diff) |
Merge pull request 'Fix xml parsing error' (#70) from Sie/tt-rss:parsing-fix into master
Reviewed-on: https://dev.tt-rss.org/fox/tt-rss/pulls/70
Diffstat (limited to 'classes/urlhelper.php')
-rw-r--r-- | classes/urlhelper.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/urlhelper.php b/classes/urlhelper.php index 83f66a810..92e7f90df 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -394,6 +394,11 @@ class UrlHelper { $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 = explode("\r\n", substr($ret, 0, $headers_length)); $contents = substr($ret, $headers_length); @@ -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); self::$fetch_last_content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); |