Skip to content

Commit

Permalink
修复 appid 为中文时无法拉取配置的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
agile.zhou committed Oct 6, 2023
1 parent ca59d7f commit 8f6dc57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<AssemblyVersion>1.7.0</AssemblyVersion>
<AssemblyVersion>1.7.1</AssemblyVersion>
<Version>1.7.0-rc</Version>
<PackageVersion>1.6.20</PackageVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<FileVersion>1.7.0</FileVersion>
<FileVersion>1.7.1</FileVersion>
<Authors>kklldog</Authors>
<Company>kklldog</Company>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 8f6dc57

Please sign in to comment.