Skip to content

Commit

Permalink
Enabled gzip compression of inbound non-SOAP HTTP requests.
Browse files Browse the repository at this point in the history
git-svn-id: http://google-api-adwords-php.googlecode.com/svn/trunk@199 bd846e36-b2c2-11de-ae6a-cd50274c347e
  • Loading branch information
eric.koleda@google.com authored and aminin committed Aug 21, 2011
1 parent 60b1133 commit 46ef434
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Google/Api/Ads/Common/Util/CurlUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ public static function CreateSession($url) {
$ch = curl_init($url);

// Default options.
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
curl_setopt($ch, CURLOPT_USERAGENT, 'curl, gzip');

// Proxy options.
if (defined('HTTP_PROXY_HOST') && HTTP_PROXY_HOST != '') {
Expand All @@ -70,7 +72,7 @@ public static function CreateSession($url) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, SSL_VERIFY_PEER);
} else {
// Default to disabled, for backwards compatibility.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
}
if (defined('SSL_CA_PATH') && SSL_CA_PATH != '') {
curl_setopt($ch, CURLOPT_CAPATH, SSL_CA_PATH);
Expand Down

0 comments on commit 46ef434

Please sign in to comment.