]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'af_unburn_fetch_only_headers' into 'master'
authorAndrew Dolgov <cthulhoo@gmail.com>
Fri, 25 Dec 2015 12:10:45 +0000 (15:10 +0300)
committerAndrew Dolgov <cthulhoo@gmail.com>
Fri, 25 Dec 2015 12:10:45 +0000 (15:10 +0300)
af_unburn: Fetch only the headers in order to get the real article URL.

As discussed in the forum https://tt-rss.org/forum/viewtopic.php?f=8&t=3631 , this change makes af_unburn download only the headers in order to find the real URL, saving bandwidth.

See merge request !21

plugins/af_unburn/init.php

index 263997dbf330a70c17c3758093a836f6f8efe2db..72f8a2606aad81ec036ed3cd9c0c7a677b29e1c5 100755 (executable)
@@ -30,6 +30,7 @@ class Af_Unburn extends Plugin {
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                curl_setopt($ch, CURLOPT_HEADER, true);
                                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+                               curl_setopt($ch, CURLOPT_NOBODY, true);
                                curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
 
                                if (defined('_CURL_HTTP_PROXY')) {