mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 20:31:30 +00:00
Enable cookies when fetching feeds with curl
If a feed requires cookies, curl needs to have them active in order to access it. This is done by setting the COOKIE_JAR option. Since we do not need the actual cookie jar, send it to /dev/null, curl will still have a valid in-memory cookie jar.
This commit is contained in:
@@ -378,6 +378,7 @@
|
|||||||
curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
|
curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
|
||||||
curl_setopt($ch, CURLOPT_ENCODING, "");
|
curl_setopt($ch, CURLOPT_ENCODING, "");
|
||||||
curl_setopt($ch, CURLOPT_REFERER, $url);
|
curl_setopt($ch, CURLOPT_REFERER, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
|
||||||
|
|
||||||
if (defined('_CURL_HTTP_PROXY')) {
|
if (defined('_CURL_HTTP_PROXY')) {
|
||||||
curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);
|
curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);
|
||||||
|
|||||||
Reference in New Issue
Block a user