From 36e24a49c5cc9c73da5ffebaee72ef7f73064e54 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 9 Feb 2013 16:17:13 +0100 Subject: [PATCH] Update cURL patch to also cover redirects --- public_html/include/include.curl.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public_html/include/include.curl.php b/public_html/include/include.curl.php index 1496d66..c4b8301 100755 --- a/public_html/include/include.curl.php +++ b/public_html/include/include.curl.php @@ -36,6 +36,7 @@ function curl_head($url) curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); curl_setopt($ch, CURLOPT_USERAGENT, 'AnonNews/2.0 Link Validator - http://www.anonnews.org/'); $return_object->result = curl_exec($ch); $error = curl_error($ch); @@ -71,6 +72,7 @@ function curl_get($url) curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); curl_setopt($ch, CURLOPT_USERAGENT, 'AnonNews/2.0 Link Validator (Title Fetcher) - http://www.anonnews.org/'); $return_object->result = curl_exec($ch); $error = curl_error($ch);