Skip to content

Commit 4e86b96

Browse files
committed
simplified encoding
1 parent 55727c1 commit 4e86b96

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/ApiRequest.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -376,29 +376,10 @@ private function sendPostPutRequest(
376376
$useragent = "SDK_" . @PHP_VERSION;
377377
$referer = @$_SERVER['HTTP_HOST'] ?? @$_SERVER['SERVER_NAME'] ?? "" . @$_SERVER['REQUEST_URI'] ?? "";
378378

379-
if (!empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
380-
$encodings = $_SERVER['HTTP_ACCEPT_ENCODING'];
381-
} else {
382-
$encodings = [];
383-
if (extension_loaded('zlib')) {
384-
$encodings[] = 'gzip';
385-
$encodings[] = 'deflate';
386-
}
387-
388-
if (extension_loaded('brotli')) {
389-
$encodings[] = 'br';
390-
}
391-
392-
$acceptEncoding = implode(', ', $encodings);
393-
if ($acceptEncoding === '') {
394-
$acceptEncoding = 'identity';
395-
}
396-
}
397-
398379
$setOptArray = [
399380
CURLOPT_URL => $this->getHost() . $api,
400381
CURLOPT_RETURNTRANSFER => true,
401-
CURLOPT_ENCODING => $encodings,
382+
CURLOPT_ENCODING => '',
402383
CURLOPT_USERAGENT => strip_tags($useragent),
403384
CURLOPT_REFERER => strip_tags($referer),
404385
CURLOPT_MAXREDIRS => 10,

0 commit comments

Comments
 (0)