summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/google.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 76ad1e4b0f6..27885f356c7 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -52,6 +52,12 @@ class Google extends \OC\Files\Storage\Common {
$this->client->setClientSecret($params['client_secret']);
$this->client->setScopes(array('https://www.googleapis.com/auth/drive'));
$this->client->setAccessToken($params['token']);
+ // if curl isn't available we're likely to run into
+ // https://github.com/google/google-api-php-client/issues/59
+ // - disable gzip to avoid it.
+ if (!function_exists('curl_version') || !function_exists('curl_exec')) {
+ $this->client->setClassConfig("Google_Http_Request", "disable_gzip", true);
+ }
// note: API connection is lazy
$this->service = new \Google_Service_Drive($this->client);
$token = json_decode($params['token'], true);