Skip to content

Commit

Permalink
Rpc http cookie behavior on V3 (#5331)
Browse files Browse the repository at this point in the history
* change default to Unspecified

* by default, an unspecified SameSite value shouldn't be added

* use enum

* update test to be more accurate

* Add explicit reference to .NET core 3.1 for http features

* update reference
  • Loading branch information
mhoeger authored and yojagad committed Apr 22, 2020
1 parent fe1dfee commit 88e523e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ private static SameSiteMode RpcSameSiteEnumConverter(RpcHttpCookie.Types.SameSit
case RpcHttpCookie.Types.SameSite.Lax:
return SameSiteMode.Lax;
case RpcHttpCookie.Types.SameSite.None:
return (SameSiteMode)(-1);
return SameSiteMode.Unspecified;
case RpcHttpCookie.Types.SameSite.ExplicitNone:
return SameSiteMode.None;
default:
return (SameSiteMode)(-1);
return SameSiteMode.Unspecified;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task AddsHttpCookies()
Path = "/",
HttpOnly = true,
MaxAge = TimeSpan.FromSeconds(20),
SameSite = (SameSiteMode)(-1)
SameSite = SameSiteMode.Unspecified
}),
new Tuple<string, string, CookieOptions>("thirdCookie", "cookieValue3", new CookieOptions()
{
Expand Down

0 comments on commit 88e523e

Please sign in to comment.