From 268a06dc6aa8ca956495a5ce0e7448f2b3cf3654 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 9 Nov 2011 18:28:45 +0400 Subject: curl: allow gzip --- functions.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 3e591ea41..275bc4d8e 100644 --- a/functions.php +++ b/functions.php @@ -382,6 +382,7 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); + curl_setopt($ch, CURLOPT_ENCODING , "gzip"); if ($post_query) { curl_setopt($ch, CURLOPT_POST, true); @@ -392,6 +393,7 @@ curl_setopt($ch, CURLOPT_USERPWD, "$login:$pass"); $contents = @curl_exec($ch); + if ($contents === false) { curl_close($ch); return false; -- cgit v1.2.3