#330 Fix and issue with the httpclient being cached on the url but not taking the http verb into accont. This caused an issue because if the same url but different verbs had handlers, the incorrect handler would be called (#331)

This commit is contained in:
Dilsy99
2018-04-25 16:46:41 +01:00
committed by Tom Pallister
parent fad190fcae
commit 027bf6867a
2 changed files with 43 additions and 2 deletions

View File

@ -97,7 +97,11 @@ namespace Ocelot.Requester
private string GetCacheKey(DownstreamContext request)
{
return request.DownstreamRequest.OriginalString;
var cacheKey = $"{request.DownstreamRequest.Method}:{request.DownstreamRequest.OriginalString}";
this._logger.LogDebug($"Cache key for request is {cacheKey}");
return cacheKey;
}
}
}