diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-13 13:08:33 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-13 13:08:33 +0100 |
commit | 672ab553c4a2b10a703ea40e049eda52db149a93 (patch) | |
tree | 10c581ab40702e113bffe6605c58a640ac5095ee /src/buffer/container.nim | |
parent | f3e2cb7bfa4517155a2c6675e6310f17d8ca4d89 (diff) | |
download | chawan-672ab553c4a2b10a703ea40e049eda52db149a93.tar.gz |
Add more cookie options
Diffstat (limited to 'src/buffer/container.nim')
-rw-r--r-- | src/buffer/container.nim | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim index a08f4cb0..67c45aa2 100644 --- a/src/buffer/container.nim +++ b/src/buffer/container.nim @@ -34,8 +34,7 @@ type ContainerEventType* = enum NO_EVENT, FAIL, SUCCESS, NEEDS_AUTH, REDIRECT, ANCHOR, NO_ANCHOR, UPDATE, - READ_LINE, READ_AREA, OPEN, INVALID_COMMAND, STATUS, ALERT, LOADED, - SET_COOKIE + READ_LINE, READ_AREA, OPEN, INVALID_COMMAND, STATUS, ALERT, LOADED ContainerEvent* = object case t*: ContainerEventType @@ -55,8 +54,6 @@ type msg*: string of UPDATE: force*: bool - of SET_COOKIE: - cookies*: seq[Cookie] else: discard Highlight* = ref object @@ -649,7 +646,7 @@ proc load*(container: Container) = if res.code == 0: container.triggerEvent(SUCCESS) if res.cookies.len > 0 and container.config.cookiejar != nil: # accept cookies - container.triggerEvent(ContainerEvent(t: SET_COOKIE, cookies: res.cookies)) + container.config.cookiejar.cookies.add(res.cookies) container.setLoadInfo("Connected to " & $container.source.location & ". Downloading...") if res.needsAuth: container.triggerEvent(NEEDS_AUTH) |