Skip to content

Commit 0935f60

Browse files
authored
Merge pull request #190 from bc-jz/master
API-644 - Adding gzip support using the CURLOPT_ENCODING option
2 parents 70e4413 + e92765e commit 0935f60

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Bigcommerce/Api/Connection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public function __construct()
9898
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, array($this, 'parseHeader'));
9999
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, array($this, 'parseBody'));
100100

101+
// Set to a blank string to make cURL include all encodings it can handle (gzip, deflate, identity) in the 'Accept-Encoding' request header and respect the 'Content-Encoding' response header
102+
curl_setopt($this->curl, CURLOPT_ENCODING, '');
103+
101104
if (!ini_get("open_basedir")) {
102105
curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);
103106
} else {

0 commit comments

Comments
 (0)