| ... | ... | @@ -90,7 +90,6 @@ pub const URL = struct { |
| 90 | 90 | var href = ManyArrayList(8 + 7, u8).init(alloc); |
| 91 | 91 | defer href.deinit(); |
| 92 | 92 | var hostname_kind: HostKind = .unset; |
| 93 | | var has_opaque_path = false; |
| 94 | 93 | // scheme |
| 95 | 94 | // : |
| 96 | 95 | // // |
| ... | ... | @@ -181,7 +180,6 @@ pub const URL = struct { |
| 181 | 180 | else { |
| 182 | 181 | href.clear(10); |
| 183 | 182 | state = .opaque_path; |
| 184 | | has_opaque_path = true; |
| 185 | 183 | } |
| 186 | 184 | } |
| 187 | 185 | // 3. Otherwise, if state override is not given, set buffer to the empty string, state to no scheme state, and start over (from the first code point in input). |
| ... | ... | @@ -833,7 +831,7 @@ pub const URL = struct { |
| 833 | 831 | } |
| 834 | 832 | |
| 835 | 833 | var path_offset: usize = 0; |
| 836 | | if (hostname_kind == .unset and !has_opaque_path and std.mem.startsWith(u8, href.items(10), "//")) { |
| 834 | if (hostname_kind == .unset and std.mem.startsWith(u8, href.items(10), "//")) { |
| 837 | 835 | try href.replace(10, 0, 0, "/."); |
| 838 | 836 | path_offset += 2; |
| 839 | 837 | } |