prefer hostname instead of host in forRequest

This commit is contained in:
Halil Durak
2025-10-14 12:12:11 +03:00
parent 6af8add7ff
commit 9b3be14650

View File

@@ -81,9 +81,10 @@ pub const Jar = struct {
prefix: ?[]const u8 = null, prefix: ?[]const u8 = null,
}; };
// FIXME: Invalid behavior.
pub fn forRequest(self: *Jar, target_url: URL, writer: anytype, opts: LookupOpts) !void { pub fn forRequest(self: *Jar, target_url: URL, writer: anytype, opts: LookupOpts) !void {
const target = PreparedUri{ const target = PreparedUri{
.host = target_url.host(), .host = target_url.getHostname(),
.path = target_url.getPath(), .path = target_url.getPath(),
.secure = target_url.isSecure(), .secure = target_url.isSecure(),
}; };