Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremeamia committed Nov 26, 2012
1 parent 4b50b81 commit 42d8627
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 12 deletions.
11 changes: 11 additions & 0 deletions _docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Changelog: 1.5.17.1

Launched Monday, November 26, 2012.

## Bug fixes and enhancements
* **Fixed:** Resolved an issue where large responses from Amazon DynamoDB were triggering unnecessary request retries.

## Services
### AmazonDynamoDB
* **New:** Support for the South American (São Paulo) Region has been added to Amazon DynamoDB.

# Changelog: 1.5.17

Launched Tuesday, November 13, 2012.
Expand Down
7 changes: 6 additions & 1 deletion lib/requestcore/requestcore.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ class RequestCore
*/
public $allow_set_time_limit = true;

/**
* Whether or not to use gzip encoding via CURLOPT_ENCODING
*/
public $use_gzip_enconding = true;


/*%******************************************************************************************%*/
// CONSTANTS
Expand Down Expand Up @@ -686,7 +691,7 @@ public function prep_request()
}

// Handle the encoding if we can.
if (extension_loaded('zlib'))
if ($this->use_gzip_enconding && extension_loaded('zlib'))
{
curl_setopt($curl_handle, CURLOPT_ENCODING, 'gzip, deflate');
}
Expand Down
16 changes: 8 additions & 8 deletions package.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sdk.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function __aws_sdk_ua_callback()
// INTERMEDIARY CONSTANTS

define('CFRUNTIME_NAME', 'aws-sdk-php');
define('CFRUNTIME_VERSION', '1.5.17');
define('CFRUNTIME_BUILD', '20121113183000');
define('CFRUNTIME_VERSION', '1.5.17.1');
define('CFRUNTIME_BUILD', '20121126140000');
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());


Expand Down
12 changes: 11 additions & 1 deletion services/dynamodb.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ class AmazonDynamoDB extends CFRuntime
*/
const REGION_TOKYO = self::REGION_APAC_NE1;

/**
* Specify the queue URL for the South America (Sao Paulo) Region.
*/
const REGION_SA_E1 = 'dynamodb.sa-east-1.amazonaws.com';

/**
* Specify the queue URL for the South America (Sao Paulo) Region.
*/
const REGION_SAO_PAULO = self::REGION_SA_E1;

/**
* Default service endpoint.
*/
Expand Down Expand Up @@ -314,7 +324,7 @@ public function __construct(array $options = array())
/**
* This allows you to explicitly sets the region for the service to use.
*
* @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_US_W2>, <REGION_EU_W1>, <REGION_APAC_SE1>, <REGION_APAC_SE2>, <REGION_APAC_NE1>.
* @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_US_W2>, <REGION_EU_W1>, <REGION_APAC_SE1>, <REGION_APAC_SE2>, <REGION_APAC_NE1>, <REGION_SA_E1>.
* @return $this A reference to the current instance.
*/
public function set_region($region)
Expand Down
5 changes: 5 additions & 0 deletions utilities/request.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public function __construct($url = null, $proxy = null, $helpers = null, CFCrede
$this->credentials = $credentials;
$this->cacert_location = ($this->credentials['certificate_authority'] ? $this->credentials['certificate_authority'] : false);

if (strpos(parse_url($url, PHP_URL_HOST), 'dynamodb') === 0)
{
$this->use_gzip_enconding = false;
}

return $this;
}
}

0 comments on commit 42d8627

Please sign in to comment.