source: TFP-WebServer/SpaceWizards.HttpListener/src/System/Net/CookieComparer.cs

Last change on this file was 376, checked in by alloc, 2 years ago

Added SpaceWizards.HttpListener for HTTP IPv6 support

File size: 891 bytes
Line 
1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3
4namespace System.Net
5{
6 internal static class CookieComparer
7 {
8 internal static int Compare(Cookie left, Cookie right)
9 {
10 int result;
11
12 if ((result = string.Compare(left.Name, right.Name, StringComparison.OrdinalIgnoreCase)) != 0)
13 {
14 return result;
15 }
16
17 if ((result = string.Compare(left.Domain, right.Domain, StringComparison.OrdinalIgnoreCase)) != 0)
18 {
19 return result;
20 }
21
22 // NB: Only the path is case sensitive as per spec. However, many Windows applications assume
23 // case-insensitivity.
24 return string.Compare(left.Path, right.Path, StringComparison.Ordinal);
25 }
26 }
27}
Note: See TracBrowser for help on using the repository browser.