From d132ac4936b89222d8ff290eabd23e2cc0de47da Mon Sep 17 00:00:00 2001 From: lungchito <32699569+lungchito@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:39:59 +0800 Subject: [PATCH 1/3] Update EnsureTables.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正SQL Server区分大小写的情况下,提示异常Invalid object name 'dbo.SYSOBJECTS'. --- src/AgileConfig.Server.Data.Freesql/EnsureTables.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AgileConfig.Server.Data.Freesql/EnsureTables.cs b/src/AgileConfig.Server.Data.Freesql/EnsureTables.cs index 1c5e37d5..32323e26 100644 --- a/src/AgileConfig.Server.Data.Freesql/EnsureTables.cs +++ b/src/AgileConfig.Server.Data.Freesql/EnsureTables.cs @@ -16,7 +16,7 @@ public class EnsureTables " SELECT count(1) FROM information_schema.TABLES WHERE table_schema= @schema AND table_name ='agc_app'"; private const string SqlServer_ExistTableSql = - "SELECT COUNT(1) FROM dbo.SYSOBJECTS WHERE ID = object_id(N'[dbo].[agc_app]') and OBJECTPROPERTY(id, N'IsUserTable') = 1"; + "SELECT COUNT(1) FROM dbo.sysobjects WHERE ID = object_id(N'[dbo].[agc_app]') and OBJECTPROPERTY(id, N'IsUserTable') = 1"; private const string Oracle_ExistTableSql = "select count(1) from user_tables where table_name = 'agc_app'"; private const string PostgreSql_ExistTableSql = "select count(1) from pg_class where relname = 'agc_app'"; @@ -91,4 +91,4 @@ public static void Ensure(IFreeSql instance) } } } -} \ No newline at end of file +} From 8f6dc572647c444f25650b05825681db1b4b40e1 Mon Sep 17 00:00:00 2001 From: "agile.zhou" Date: Sat, 7 Oct 2023 01:05:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20appid=20=E4=B8=BA?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=97=B6=E6=97=A0=E6=B3=95=E6=8B=89=E5=8F=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AgileConfig.Server.Apisite.csproj | 4 ++-- .../Websocket/MessageHandlers/MessageHandler.cs | 5 ++++- .../Websocket/WebsocketHandlerMiddleware.cs | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj index 19ae642a..83219f9e 100644 --- a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj +++ b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj @@ -3,11 +3,11 @@ net6.0 InProcess - 1.7.0 + 1.7.1 1.7.0-rc 1.6.20 Linux - 1.7.0 + 1.7.1 kklldog kklldog diff --git a/src/AgileConfig.Server.Apisite/Websocket/MessageHandlers/MessageHandler.cs b/src/AgileConfig.Server.Apisite/Websocket/MessageHandlers/MessageHandler.cs index effd63f8..d39eee7c 100644 --- a/src/AgileConfig.Server.Apisite/Websocket/MessageHandlers/MessageHandler.cs +++ b/src/AgileConfig.Server.Apisite/Websocket/MessageHandlers/MessageHandler.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Web; using Agile.Config.Protocol; using AgileConfig.Server.IService; using Microsoft.AspNetCore.Http; @@ -58,10 +59,12 @@ public async Task Handle(string message, HttpRequest request, WebsocketClient cl message = ""; } - if (message == "ping") + // "ping" is old version + if (message == "ping" || message == "c:ping") { //如果是ping,回复本地数据的md5版本 var appId = request.Headers["appid"]; + appId = HttpUtility.UrlDecode(appId); var env = request.Headers["env"]; env = await _configService.IfEnvEmptySetDefaultAsync(env); var md5 = await _configService.AppPublishedConfigsMd5CacheWithInheritanced(appId, env); diff --git a/src/AgileConfig.Server.Apisite/Websocket/WebsocketHandlerMiddleware.cs b/src/AgileConfig.Server.Apisite/Websocket/WebsocketHandlerMiddleware.cs index 58ace610..3e543008 100644 --- a/src/AgileConfig.Server.Apisite/Websocket/WebsocketHandlerMiddleware.cs +++ b/src/AgileConfig.Server.Apisite/Websocket/WebsocketHandlerMiddleware.cs @@ -56,6 +56,8 @@ public async Task Invoke( appId = appIdSecret.Item1; } + appId = HttpUtility.UrlDecode(appId); + var env = context.Request.Headers["env"]; if (!string.IsNullOrEmpty(env)) { From 3e96b0558183678214a23f262c683d9cfc73a7de Mon Sep 17 00:00:00 2001 From: "agile.zhou" Date: Sat, 7 Oct 2023 01:05:36 +0800 Subject: [PATCH 3/3] update version to 1.7.1 --- .../AgileConfig.Server.Apisite.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj index 83219f9e..fe11827c 100644 --- a/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj +++ b/src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj @@ -4,7 +4,7 @@ net6.0 InProcess 1.7.1 - 1.7.0-rc + 1.7.1 1.6.20 Linux 1.7.1