diff --git a/src/HttpClientBuilder.php b/src/HttpClientBuilder.php index 41afbd68..6ae03abf 100644 --- a/src/HttpClientBuilder.php +++ b/src/HttpClientBuilder.php @@ -55,7 +55,7 @@ public function __construct() $this->followRedirectsInterceptor = new FollowRedirects(10); $this->retryInterceptor = new RetryRequests(2); $this->defaultAcceptInterceptor = new SetRequestHeaderIfUnset('accept', '*/*'); - $this->defaultUserAgentInterceptor = new SetRequestHeaderIfUnset('user-agent', 'amphp/http-client @ v5.x'); + $this->defaultUserAgentInterceptor = new SetRequestHeaderIfUnset('user-agent', 'amphp/http-client/5.x'); $this->defaultCompressionHandler = new DecompressResponse; } diff --git a/test/ClientHttpBinIntegrationTest.php b/test/ClientHttpBinIntegrationTest.php index 75931eed..da6dd9ff 100644 --- a/test/ClientHttpBinIntegrationTest.php +++ b/test/ClientHttpBinIntegrationTest.php @@ -155,7 +155,7 @@ public function testDefaultUserAgentSent(): void $body = $response->getBody()->buffer(); $result = \json_decode($body, true); - self::assertSame('amphp/http-client @ v5.x', $result['user-agent']); + self::assertSame('amphp/http-client/5.x', $result['user-agent']); } public function testDefaultUserAgentCanBeChanged(): void @@ -206,7 +206,7 @@ public function testHeaderCase(): void self::assertSame([ ['tEst', 'test'], ['accept', '*/*'], - ['user-agent', 'amphp/http-client @ v5.x'], + ['user-agent', 'amphp/http-client/5.x'], ['Accept-Encoding', 'gzip, deflate, identity'], ['host', (string) $this->socket->getAddress()], ], $result);