We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d6ee42 commit d93a065Copy full SHA for d93a065
src/url/url.zig
@@ -67,7 +67,7 @@ pub const URL = struct {
67
}
68
69
pub fn deinit(self: *URL, alloc: std.mem.Allocator) void {
70
- self.search_params.deinit();
+ self.search_params.deinit(alloc);
71
alloc.free(self.rawuri);
72
73
@@ -90,9 +90,9 @@ pub const URL = struct {
90
.scheme = true,
91
.authentication = true,
92
.authority = true,
93
- .path = true,
94
- .query = true,
95
- .fragment = true,
+ .path = self.uri.path.len > 0,
+ .query = self.uri.query != null and self.uri.query.?.len > 0,
+ .fragment = self.uri.fragment != null and self.uri.fragment.?.len > 0,
96
}, buf.writer());
97
return try buf.toOwnedSlice();
98
0 commit comments