From ad7cbccbf8dd324be76a0ca240a80eec40adf9d2 Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 11 Apr 2019 08:02:16 +1000 Subject: [PATCH] WebBrowserExtensions.LoadUrlWithPostData - Set UrlRequestFlags.AllowCachedCredentials Possible workaround for sending cookies Issue #2705 --- CefSharp/WebBrowserExtensions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CefSharp/WebBrowserExtensions.cs b/CefSharp/WebBrowserExtensions.cs index c628d9b1ae..6cef046d15 100644 --- a/CefSharp/WebBrowserExtensions.cs +++ b/CefSharp/WebBrowserExtensions.cs @@ -364,6 +364,9 @@ public static void LoadUrlWithPostData(this IWebBrowser browser, string url, byt request.Url = url; request.Method = "POST"; + //Add AllowCachedCredentials as per suggestion linked in + //https://github.com/cefsharp/CefSharp/issues/2705#issuecomment-476819788 + request.Flags = UrlRequestFlags.AllowCachedCredentials; request.PostData.AddData(postDataBytes);