]> git.wh0rd.org - tt-rss.git/commitdiff
Merge pull request #388 from dzaikos/fix-curl-head-request-method
authorAndrew Dolgov <gothfox@users.noreply.github.com>
Mon, 7 Jul 2014 05:15:16 +0000 (09:15 +0400)
committerAndrew Dolgov <gothfox@users.noreply.github.com>
Mon, 7 Jul 2014 05:15:16 +0000 (09:15 +0400)
Fixed geturl() function to ensure HEAD request method is used.

include/functions2.php

index d6a399ffcdd9a1fd4db9a5c7740abfe9ceb4d00d..3e33672402f0ccd6ea0d33096ceae03ec79bebbf 100644 (file)
                curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0 Firefox/5.0');
                curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
                curl_setopt($curl, CURLOPT_HEADER, true);
+               curl_setopt($curl, CURLOPT_NOBODY, true);
                curl_setopt($curl, CURLOPT_REFERER, $url);
                curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
                curl_setopt($curl, CURLOPT_AUTOREFERER, true);