Fix: This string.Equals Method Windows is normal, but running under Centos, due to a case of the string problem, seems to be. NET core implementation issues on a Linux system is case sensitive.

Modifications are as follows
            var applicableReRoutes = configuration.Data.ReRoutes.Where(r => string.Equals(r.UpstreamHttpMethod.Method.ToLower(), upstreamHttpMethod.ToLower(), StringComparison.CurrentCultureIgnoreCase));
This commit is contained in:
geffzhang 2017-03-16 20:13:27 +08:00
parent 01fc26fb68
commit 18d4013e61

View File

@ -25,7 +25,7 @@ namespace Ocelot.DownstreamRouteFinder.Finder
{ {
var configuration = _configProvider.Get(); var configuration = _configProvider.Get();
var applicableReRoutes = configuration.Data.ReRoutes.Where(r => string.Equals(r.UpstreamHttpMethod.Method, upstreamHttpMethod, StringComparison.CurrentCultureIgnoreCase)); var applicableReRoutes = configuration.Data.ReRoutes.Where(r => string.Equals(r.UpstreamHttpMethod.Method.ToLower(), upstreamHttpMethod.ToLower(), StringComparison.CurrentCultureIgnoreCase));
foreach (var reRoute in applicableReRoutes) foreach (var reRoute in applicableReRoutes)
{ {