mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-17 18:03:22 +08:00
fix code broken after net5.0 upgrade
This commit is contained in:
parent
1c6bfc3314
commit
a9eec31aaf
@ -413,9 +413,18 @@ namespace Ocelot.AcceptanceTests
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.Request.Cookies.TryGetValue("test", out var cookieValue) || context.Request.Headers.TryGetValue("Set-Cookie", out var headerValue))
|
if (context.Request.Cookies.TryGetValue("test", out var cookieValue))
|
||||||
{
|
{
|
||||||
if (cookieValue == "0" || headerValue == "test=1; path=/")
|
if (cookieValue == "0")
|
||||||
|
{
|
||||||
|
context.Response.StatusCode = statusCode;
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (context.Request.Headers.TryGetValue("Set-Cookie", out var headerValue))
|
||||||
|
{
|
||||||
|
if (headerValue == "test=1; path=/")
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = statusCode;
|
context.Response.StatusCode = statusCode;
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user