Closed
Description
I encountered an issue with cookies being enclosed in double quotes when implementing third-party website login using the Flurl dependency. However, Flurl automatically removes the double quotes, whereas Python Requests retains them. This discrepancy between the two parts in subsequent requests might be one of the reasons for my login failure, but I’m not sure. I need to eliminate each potential problem one by one. I tried the following code, but it had no effect, and the cookie even disappeared from the request headers.
var cookie = session.Cookies.First(i => i.Name == "Y1vJ4IdorMglXdNk");
session.Cookies.Remove(i => i.Name == "Y1vJ4IdorMglXdNk");
session.Cookies.AddOrReplace(new FlurlCookie(cookie.Name, $"\"{cookie.Value}\"", cookie.OriginUrl));
I’m not sure if this is a bug in Flurl. Please provide me with a method to automatically handle wrapping cookies in double quotes, or tell me how to manually handle it.