This commit is contained in:
Jarred Sumner
2021-09-09 23:33:34 -07:00
parent 8a02ad48a5
commit fc907e2f81
63 changed files with 924 additions and 1590 deletions

View File

@@ -226,7 +226,12 @@ pub const URL = struct {
}
if (base.len > path_offset and base[path_offset] == '/' and offset > 0) {
url.pathname = base[path_offset..std.math.min(offset, base.len)];
if (url.search.len > 0) {
url.pathname = base[path_offset..std.math.min(offset + url.search.len, base.len)];
} else {
url.pathname = base[path_offset..std.math.min(offset, base.len)];
}
url.origin = base[0..path_offset];
}