Fixing useragent string to use lowercase keys

This commit is contained in:
aydiv
2013-03-13 14:31:12 +05:30
parent 9e09f7bff5
commit 3e56fe5143

View File

@@ -2,7 +2,7 @@
namespace PayPal\Common; namespace PayPal\Common;
define('SDK_NAME', 'REST-SDK-PHP'); define('SDK_NAME', 'rest-sdk-php');
define('SDK_VERSION', '0.5.0'); define('SDK_VERSION', '0.5.0');
class UserAgent { class UserAgent {
@@ -14,15 +14,15 @@ class UserAgent {
public static function getValue() { public static function getValue() {
$featureList = array( $featureList = array(
'Lang=PHP', 'lang=PHP',
'V=' . PHP_VERSION, 'v=' . PHP_VERSION,
'Bit=' . UserAgent::_getPHPBit(), 'bit=' . UserAgent::_getPHPBit(),
'OS=' . str_replace(' ' , '_', php_uname('s') . ' ' . php_uname('r')), 'os=' . str_replace(' ' , '_', php_uname('s') . ' ' . php_uname('r')),
'Machine=' . php_uname('m') 'machine=' . php_uname('m')
); );
if(defined('OPENSSL_VERSION_TEXT')) { if(defined('OPENSSL_VERSION_TEXT')) {
$opensslVersion = explode(' ', OPENSSL_VERSION_TEXT); $opensslVersion = explode(' ', OPENSSL_VERSION_TEXT);
$featureList[] = 'Openssl='. $opensslVersion[1]; $featureList[] = 'openssl='. $opensslVersion[1];
} }
if(function_exists('curl_version')) { if(function_exists('curl_version')) {
$curlVersion = curl_version(); $curlVersion = curl_version();