From afe129fd923d8556fab7a00f3c675f6eaba608d5 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 30 Mar 2019 16:53:26 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/CookieCollection.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index 97f886d6..be66c009 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -220,6 +220,17 @@ namespace WebSocketSharp.Net #region Private Methods + private void add (Cookie cookie) + { + var idx = searchCookie (cookie); + if (idx == -1) { + _list.Add (cookie); + return; + } + + _list[idx] = cookie; + } + private static int compareCookieWithinSort (Cookie x, Cookie y) { return (x.Name.Length + x.Value.Length) - (y.Name.Length + y.Value.Length);