Skip to content

Commit 4103a35

Browse files
committed
wip
1 parent 8ab0024 commit 4103a35

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/browser/storage/cookie.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ pub const Cookie = struct {
312312
@memcpy(s[1..], d);
313313
break :blk s;
314314
} else blk: {
315-
break :blk try aa.dupe(u8, host);
315+
break :blk try aa.dupe(u8, host); // Sjors: Should subdomains be removed from host?
316316
};
317317
_ = toLower(owned_domain);
318318

src/cdp/domains/storage.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Lightpanda (Selecy SAS)
1+
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
22
//
33
// Francis Bouvier <[email protected]>
44
// Pierre Tachoire <[email protected]>
@@ -68,8 +68,8 @@ fn getCookies(cmd: anytype) !void {
6868
}
6969
}
7070
bc.session.cookie_jar.removeExpired(null);
71-
const cookies = CookieWriter{ .cookies = bc.session.cookie_jar.cookies.items };
72-
try cmd.sendResult(.{ .cookies = cookies }, .{});
71+
const writer = CookieWriter{ .cookies = bc.session.cookie_jar.cookies.items };
72+
try cmd.sendResult(.{ .cookies = writer }, .{});
7373
}
7474

7575
fn setCookies(cmd: anytype) !void {
@@ -143,7 +143,7 @@ pub fn setCdpCookie(cookie_jar: *CookieJar, param: CdpCookie) !void {
143143

144144
// NOTE: The param.url can affect the default domain, path, source port, and source scheme.
145145
const uri = if (param.url) |url| std.Uri.parse(url) catch return error.InvalidParams else null;
146-
const domain = try percentEncodedDomainOrHost(a, uri, param.domain) orelse return error.InvalidParams;
146+
const domain = try percentEncodedDomainOrHost(a, uri, param.domain) orelse return error.InvalidParams; // TODO Domain needs to be prefixed with a dot if is explicitely set
147147

148148
const cookie = Cookie{
149149
.arena = arena,

0 commit comments

Comments
 (0)