You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -224,5 +239,8 @@ private static partial class Log
224
239
225
240
[LoggerMessage(3,LogLevel.Debug,"The cookie '{name}' has set 'Partitioned' and should also set 'SameSite=None'. This cookie will likely be rejected by the client.",EventName="PartitionedNotSameSiteNone")]
[LoggerMessage(4,LogLevel.Debug,"The cookie '{name}' has set 'Partitioned' and should also set 'Path=/'. This cookie may be rejected by the client.",EventName="PartitionedNotPathRoot")]
Copy file name to clipboardExpand all lines: src/Http/Http/test/ResponseCookiesTest.cs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ public void AppendPartitionedLogsWarnings()
120
120
Partitioned=true,
121
121
// Missing SameSite = SameSiteMode.None,
122
122
// Missing Secure = true,
123
+
Path="/a",// Should be Path = "/",
123
124
});
124
125
125
126
varcookieHeaderValues=headers.SetCookie;
@@ -132,6 +133,7 @@ public void AppendPartitionedLogsWarnings()
132
133
[
133
134
entry =>Assert.Equal($"The cookie '{testCookie}' has set 'Partitioned' and must also set 'Secure'. This cookie will likely be rejected by the client.",entry.Message),
134
135
entry =>Assert.Equal($"The cookie '{testCookie}' has set 'Partitioned' and should also set 'SameSite=None'. This cookie will likely be rejected by the client.",entry.Message),
136
+
entry =>Assert.Equal($"The cookie '{testCookie}' has set 'Partitioned' and should also set 'Path=/'. This cookie may be rejected by the client.",entry.Message),
135
137
]);
136
138
}
137
139
@@ -164,6 +166,7 @@ public void AppendPartitionedLogsWarningsForEachCookie()
164
166
Partitioned=true,
165
167
// Missing SameSite = SameSiteMode.None,
166
168
// Missing Secure = true,
169
+
Path="/a",// Should be Path = "/",
167
170
});
168
171
169
172
varcookieHeaderValues=headers.SetCookie;
@@ -178,8 +181,10 @@ public void AppendPartitionedLogsWarningsForEachCookie()
178
181
[
179
182
entry =>Assert.Equal($"The cookie '{testCookie1}' has set 'Partitioned' and must also set 'Secure'. This cookie will likely be rejected by the client.",entry.Message),
180
183
entry =>Assert.Equal($"The cookie '{testCookie1}' has set 'Partitioned' and should also set 'SameSite=None'. This cookie will likely be rejected by the client.",entry.Message),
184
+
entry =>Assert.Equal($"The cookie '{testCookie1}' has set 'Partitioned' and should also set 'Path=/'. This cookie may be rejected by the client.",entry.Message),
181
185
entry =>Assert.Equal($"The cookie '{testCookie2}' has set 'Partitioned' and must also set 'Secure'. This cookie will likely be rejected by the client.",entry.Message),
182
186
entry =>Assert.Equal($"The cookie '{testCookie2}' has set 'Partitioned' and should also set 'SameSite=None'. This cookie will likely be rejected by the client.",entry.Message),
187
+
entry =>Assert.Equal($"The cookie '{testCookie2}' has set 'Partitioned' and should also set 'Path=/'. This cookie may be rejected by the client.",entry.Message),
183
188
]);
184
189
}
185
190
@@ -205,13 +210,15 @@ public void AppendPartitionedCorrectlyDoesNotLog()
0 commit comments