Skip to content

Commit ef3ae5b

Browse files
author
Jamie Hannaford
committed
Merge pull request #618 from jamiehannaford/fix-user-agent-version
use correct version in user-agent header
2 parents 7aa9291 + 69fd07b commit ef3ae5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/OpenCloud/Common/Http/Client.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace OpenCloud\Common\Http;
1919

2020
use Guzzle\Http\Client as GuzzleClient;
21-
use Guzzle\Http\Curl\CurlVersion;
21+
use OpenCloud\Version;
2222
use OpenCloud\Common\Exceptions\UnsupportedVersionError;
2323

2424
/**
@@ -27,7 +27,6 @@
2727
*/
2828
class Client extends GuzzleClient
2929
{
30-
const VERSION = '1.9.0';
3130
const MINIMUM_PHP_VERSION = '5.3.0';
3231

3332
public function __construct($baseUrl = '', $config = null)
@@ -46,9 +45,10 @@ public function __construct($baseUrl = '', $config = null)
4645

4746
public function getDefaultUserAgent()
4847
{
49-
return 'OpenCloud/' . self::VERSION
50-
. ' cURL/' . CurlVersion::getInstance()->get('version')
51-
. ' PHP/' . PHP_VERSION;
48+
return 'OpenCloud/' . Version::getVersion()
49+
. ' Guzzle/' . Version::getGuzzleVersion()
50+
. ' cURL/' . Version::getCurlVersion()
51+
. ' PHP/' . PHP_VERSION;
5252
}
5353

5454
public function getUserAgent()

0 commit comments

Comments
 (0)