From 07ea87e427762c8d29785cda463cffb32b6bb505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E5=B0=8F=E5=83=A7?= Date: Tue, 3 Dec 2024 16:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8A=20=E5=8F=91=E5=B8=83=20`v1.0.6.1`?= =?UTF-8?q?=20=E7=89=88=E6=9C=AC=EF=BC=8C=E6=94=B9=E8=BF=9B=20`RateLimited?= =?UTF-8?q?Stream`=20=E5=B8=A6=E5=BA=94=E7=94=A8=E9=80=9F=E7=8E=87?= =?UTF-8?q?=E9=99=90=E5=88=B6=E7=9A=84=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Directory.Build.props | 2 +- src/HttpAgent/test/HttpRemoteServiceTests.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e91f3e3..135e511 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -9,7 +9,7 @@ true snupkg $(SolutionDir)nupkgs - 1.0.6 + 1.0.6.1 $(Version) 百小僧 HttpAgent 是一个高性能、灵活且易用的开源库,提供了全面的 HTTP 功能支持,包括文件传输、轮询、测试工具、实时通信、请求管理、Media 类型处理、MessagePack 支持等,并具有低资源消耗和高测试覆盖率的特点。 diff --git a/src/HttpAgent/test/HttpRemoteServiceTests.cs b/src/HttpAgent/test/HttpRemoteServiceTests.cs index 967dbcb..d509957 100644 --- a/src/HttpAgent/test/HttpRemoteServiceTests.cs +++ b/src/HttpAgent/test/HttpRemoteServiceTests.cs @@ -88,7 +88,7 @@ public void CreateHttpClientWithDefaults_ReturnOK() Assert.NotNull(httpClient); Assert.Null(httpClientPooling.Release); - Assert.Equal("HttpAgent/1.0.6.0", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); var httpRequestBuilder2 = new HttpRequestBuilder(HttpMethod.Get, new Uri("/api/test", UriKind.RelativeOrAbsolute)) @@ -99,7 +99,7 @@ public void CreateHttpClientWithDefaults_ReturnOK() Assert.NotNull(httpClient2.BaseAddress); Assert.Equal("http://localhost/test/", httpClient2.BaseAddress.ToString()); Assert.Null(httpClientPooling2.Release); - Assert.Equal("HttpAgent/1.0.6.0", httpClient2.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient2.DefaultRequestHeaders.GetValues("User-Agent").First()); var httpClient3 = new HttpClient { BaseAddress = new Uri("http://localhost/custom") }; var httpRequestBuilder3 = @@ -112,7 +112,7 @@ public void CreateHttpClientWithDefaults_ReturnOK() var httpClientPooling3 = httpRemoteService.CreateHttpClientWithDefaults(httpRequestBuilder3); var httpClient4 = httpClientPooling3.Instance; Assert.Equal(httpClient3, httpClient4); - Assert.Equal("HttpAgent/1.0.6.0", httpClient4.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient4.DefaultRequestHeaders.GetValues("User-Agent").First()); Assert.NotNull(httpClientPooling3.Release); httpClientPooling3.Release(httpClient3); @@ -153,7 +153,7 @@ public void CreateHttpClientPooling_ReturnOK() Assert.NotNull(httpClient); Assert.Null(httpClientPooling.Release); - Assert.Equal("HttpAgent/1.0.6.0", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); var httpRequestBuilder2 = new HttpRequestBuilder(HttpMethod.Get, new Uri("/api/test", UriKind.RelativeOrAbsolute)) @@ -164,7 +164,7 @@ public void CreateHttpClientPooling_ReturnOK() Assert.NotNull(httpClient2.BaseAddress); Assert.Equal("http://localhost/test/", httpClient2.BaseAddress.ToString()); Assert.Null(httpClientPooling2.Release); - Assert.Equal("HttpAgent/1.0.6.0", httpClient2.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient2.DefaultRequestHeaders.GetValues("User-Agent").First()); var httpClient3 = new HttpClient { BaseAddress = new Uri("http://localhost/custom") }; var httpRequestBuilder3 = @@ -177,7 +177,7 @@ public void CreateHttpClientPooling_ReturnOK() var httpClientPooling3 = httpRemoteService.CreateHttpClientPooling(httpRequestBuilder3); var httpClient4 = httpClientPooling3.Instance; Assert.Equal(httpClient3, httpClient4); - Assert.Equal("HttpAgent/1.0.6.0", httpClient4.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient4.DefaultRequestHeaders.GetValues("User-Agent").First()); Assert.NotNull(httpClientPooling3.Release); httpClientPooling3.Release(httpClient3); @@ -190,7 +190,7 @@ public void AddDefaultUserAgentHeader_ReturnOK() var httpClient = new HttpClient(); HttpRemoteService.AddDefaultUserAgentHeader(httpClient); - Assert.Equal("HttpAgent/1.0.6.0", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); + Assert.Equal("HttpAgent/1.0.6.1", httpClient.DefaultRequestHeaders.GetValues("User-Agent").First()); var httpClient2 = new HttpClient(); httpClient2.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "furion");