2020 */
2121class Google_Config
2222{
23+ const GZIP_DISABLED = true ;
24+ const GZIP_ENABLED = false ;
25+ const GZIP_UPLOADS_ENABLED = true ;
26+ const GZIP_UPLOADS_DISABLED = false ;
2327 const USE_AUTO_IO_SELECTION = "auto " ;
2428 private $ configuration ;
2529
@@ -47,12 +51,21 @@ public function __construct($ini_file_location = null)
4751
4852 // Definition of class specific values, like file paths and so on.
4953 'classes ' => array (
50- // If you want to pass in OAuth 2.0 settings, they will need to be
51- // structured like this.
54+ 'Google_IO_Abstract ' => array (
55+ 'request_timeout_seconds ' => 100 ,
56+ ),
5257 'Google_Http_Request ' => array (
53- // Disable the use of gzip on calls if set to true.
54- 'disable_gzip ' => false
58+ // Disable the use of gzip on calls if set to true. Defaults to false.
59+ 'disable_gzip ' => self ::GZIP_ENABLED ,
60+
61+ // We default gzip to disabled on uploads even if gzip is otherwise
62+ // enabled, due to some issues seen with small packet sizes for uploads.
63+ // Please test with this option before enabling gzip for uploads in
64+ // a production environment.
65+ 'enable_gzip_for_uploads ' => self ::GZIP_UPLOADS_DISABLED ,
5566 ),
67+ // If you want to pass in OAuth 2.0 settings, they will need to be
68+ // structured like this.
5669 'Google_Auth_OAuth2 ' => array (
5770 // Keys for OAuth 2.0 access, see the API console at
5871 // https://developers.google.com/console
@@ -109,7 +122,7 @@ public function setClassConfig($class, $config, $value = null)
109122 $ this ->configuration ['classes ' ][$ class ] = $ config ;
110123 }
111124 }
112-
125+
113126 public function getClassConfig ($ class , $ key = null )
114127 {
115128 if (!isset ($ this ->configuration ['classes ' ][$ class ])) {
@@ -139,7 +152,7 @@ public function getAuthClass()
139152 {
140153 return $ this ->configuration ['auth_class ' ];
141154 }
142-
155+
143156 /**
144157 * Set the auth class.
145158 *
@@ -155,7 +168,7 @@ public function setAuthClass($class)
155168 }
156169 $ this ->configuration ['auth_class ' ] = $ class ;
157170 }
158-
171+
159172 /**
160173 * Set the IO class.
161174 *
@@ -268,7 +281,7 @@ public function setApprovalPrompt($approval)
268281 {
269282 $ this ->setAuthConfig ('approval_prompt ' , $ approval );
270283 }
271-
284+
272285 /**
273286 * Set the developer key for the auth class. Note that this is separate value
274287 * from the client ID - if it looks like a URL, its a client ID!
@@ -286,7 +299,7 @@ public function getBasePath()
286299 {
287300 return $ this ->configuration ['base_path ' ];
288301 }
289-
302+
290303 /**
291304 * Set the auth configuration for the current auth class.
292305 * @param $key - the key to set
0 commit comments