summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-09 18:28:45 +0400
committerAndrew Dolgov <[email protected]>2011-11-09 18:28:45 +0400
commit268a06dc6aa8ca956495a5ce0e7448f2b3cf3654 (patch)
treeb8219083cdf18425f19bb387f0f90831027148d7
parentb93ad1e10e0f0cbd1a6385e60fcbec3cf8ec838b (diff)
curl: allow gzip
-rw-r--r--functions.php2
1 files changed, 2 insertions, 0 deletions
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;