mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Setting BrowserWindow Cookies to a value that should be or is URL encoded fails #688
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ppostman on GitHub (Aug 6, 2021).
Electron.NET v13.5.1
I'm using BrowserWindow.WebContents.Session.Cookies.SetAsync(CookieDetails) and most cookies are being set properly, but if I have a value that contains a URL for example, the method will fail whether I URL encode the value or not. This also occurs for values that contain semi colons.
Example: Setting a _landing_page cookie to a value of /2192362/checkouts/4bba0ebb64be7d014ae86bc1fe2ffb39
I have tried setting the cookie value in plain text and as an encoded value as such,
parsing checkpoint cookie _landing_page: /2192362/checkouts/3e34bad9e08e141d659830a21736b97f
parsing checkpoint cookie _landing_page: %2f2192362%2fcheckouts%2f4bba0ebb64be7d014ae86bc1fe2ffb39
Each attempt error's and halts the thread, even when placed into a try catch.
Perhaps I'm missing something in the way I'm supposed to be encoding the values or setting the cookie, any insight would be appreciated.