curl: allow gzip

master
Andrew Dolgov 13 years ago
parent b93ad1e10e
commit 268a06dc6a

@ -382,6 +382,7 @@
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
curl_setopt($ch, CURLOPT_ENCODING , "gzip");
if ($post_query) { if ($post_query) {
curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POST, true);
@ -392,6 +393,7 @@
curl_setopt($ch, CURLOPT_USERPWD, "$login:$pass"); curl_setopt($ch, CURLOPT_USERPWD, "$login:$pass");
$contents = @curl_exec($ch); $contents = @curl_exec($ch);
if ($contents === false) { if ($contents === false) {
curl_close($ch); curl_close($ch);
return false; return false;

Loading…
Cancel
Save