aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/query_string_map.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/query_string_map.zig b/src/query_string_map.zig
index 9fcea07a1..292e581b0 100644
--- a/src/query_string_map.zig
+++ b/src/query_string_map.zig
@@ -294,6 +294,10 @@ pub const URL = struct {
url.pathname = "/";
}
+ while (url.pathname.len > 1 and @bitCast(u16, url.pathname[0..2].*) == comptime std.mem.readIntNative(u16, "//")) {
+ url.pathname = url.pathname[1..];
+ }
+
url.origin = std.mem.trim(u8, url.origin, "/ ?#");
return url;
}