From 6d2dd585a5d87fa745d48188dd096ca6e63014d0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Oct 2025 10:14:43 -0700 Subject: [PATCH] os: allow the mac-address-as-hostname parsing to happen everywhere --- src/os/hostname.zig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/os/hostname.zig b/src/os/hostname.zig index 9f25e4c35..fce39fd5a 100644 --- a/src/os/hostname.zig +++ b/src/os/hostname.zig @@ -46,10 +46,6 @@ fn isValidMacAddress(mac_address: []const u8) bool { /// correctly. pub fn parseUrl(url: []const u8) UrlParsingError!std.Uri { return std.Uri.parse(url) catch |e| { - // The mac-address-as-hostname issue is specific to macOS so we just return an error if we - // hit it on other platforms. - if (comptime builtin.os.tag != .macos) return e; - // It's possible this is a mac address on macOS where the last 2 characters in the // address are non-digits, e.g. 'ff', and thus an invalid port. // @@ -282,7 +278,6 @@ test parseUrl { try std.testing.expect(uri.port == 12); // Alphabetical mac addresses. - uri = try parseUrl("file://ab:cd:ef:ab:cd:ef/home/test/"); try std.testing.expectEqualStrings("file", uri.scheme);