Browse Source

aggregate headers are case sensitive

pull/116/head
cKey 5 years ago
parent
commit
798e5d22ad
  1. 2
      aspnet-core/LINGYUN.MicroService.sln
  2. 10
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Ocelot/Middleware/Multiplexer/AbpApiDefinitionAggregator.cs

2
aspnet-core/LINGYUN.MicroService.sln

@ -249,7 +249,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManag
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain.Identity", "modules\identity\LINGYUN.Abp.PermissionManagement.Domain.Identity\LINGYUN.Abp.PermissionManagement.Domain.Identity.csproj", "{2D377D3A-70EC-4BB3-9F4C-6C933693DA98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Account.Web", "modules\account\LINGYUN.Abp.Account.Web\LINGYUN.Abp.Account.Web.csproj", "{5F43141B-6C63-4547-B9D6-D69EC3D7CA7E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Account.Web", "modules\account\LINGYUN.Abp.Account.Web\LINGYUN.Abp.Account.Web.csproj", "{5F43141B-6C63-4547-B9D6-D69EC3D7CA7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

10
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Ocelot/Middleware/Multiplexer/AbpApiDefinitionAggregator.cs

@ -20,9 +20,11 @@ namespace Ocelot.Middleware.Multiplexer
protected virtual async Task<DownstreamResponse> MapAbpApiDefinitionAggregateContentAsync(List<HttpContext> responses)
{
JObject responseObject = null;
JsonMergeSettings mergeSetting = new JsonMergeSettings();
mergeSetting.MergeArrayHandling = MergeArrayHandling.Union;
mergeSetting.PropertyNameComparison = System.StringComparison.CurrentCultureIgnoreCase;
JsonMergeSettings mergeSetting = new JsonMergeSettings
{
MergeArrayHandling = MergeArrayHandling.Union,
PropertyNameComparison = System.StringComparison.CurrentCultureIgnoreCase
};
foreach (var httpResponse in responses)
{
var content = await httpResponse.Items.DownstreamResponse().Content.ReadAsStringAsync();
@ -40,7 +42,7 @@ namespace Ocelot.Middleware.Multiplexer
{
Headers = { ContentType = new MediaTypeHeaderValue("application/json") }
};
stringContent.Headers.Add("_abperrorformat", "true");
stringContent.Headers.Add("_AbpErrorFormat", "true");
return new DownstreamResponse(stringContent, HttpStatusCode.OK,
new List<KeyValuePair<string, IEnumerable<string>>>(), "OK");
}

Loading…
Cancel
Save