| ... | ... | @@ -1334,7 +1334,7 @@ pub fn parseIPv4(input: []const u8) !u32 { |
| 1334 | 1334 | // 2. Increment counter by 1. |
| 1335 | 1335 | } |
| 1336 | 1336 | // 13. Return ipv4. |
| 1337 | | return ipv4; |
| 1337 | return @byteSwap(ipv4); |
| 1338 | 1338 | } |
| 1339 | 1339 | |
| 1340 | 1340 | /// https://url.spec.whatwg.org/#ipv4-number-parser |
| ... | ... | @@ -1597,7 +1597,7 @@ fn setHost(href: *ManyArrayList(15, u8), h: URL.Host) !void { |
| 1597 | 1597 | }, |
| 1598 | 1598 | .ipv4 => { |
| 1599 | 1599 | const bytes: [4]u8 = @bitCast(h.ipv4); |
| 1600 | | try href.print(7, "{d}.{d}.{d}.{d}", .{ bytes[3], bytes[2], bytes[1], bytes[0] }); |
| 1600 | try href.print(7, "{d}.{d}.{d}.{d}", .{ bytes[0], bytes[1], bytes[2], bytes[3] }); |
| 1601 | 1601 | }, |
| 1602 | 1602 | .ipv6 => { |
| 1603 | 1603 | const pieces: [8]u16 = @bitCast(h.ipv6); |