cdp: fix network.getCookies url build

When getting cookies from CDP, we musn't apply specific cookies's
path/host extraction for the target URL, but use the simple URL rules.
This commit is contained in:
Pierre Tachoire
2026-06-03 16:37:03 +02:00
parent 85d5e47ffc
commit 00a91c7dac

View File

@@ -231,8 +231,8 @@ fn getCookies(cmd: *CDP.Command) !void {
var urls = try std.ArrayList(CdpStorage.PreparedUri).initCapacity(cmd.arena, param_urls.len);
for (param_urls) |url| {
urls.appendAssumeCapacity(.{
.host = try Cookie.parseDomain(cmd.arena, url, null),
.path = try Cookie.parsePath(cmd.arena, url, null),
.host = URL.getHostname(url),
.path = URL.getPathname(url),
.secure = URL.isSecure(url),
});
}