| ... | @@ -239,7 +239,7 @@ pub fn parseAfterScheme(scheme: []const u8, text: []const u8) ParseError!Uri { | ... | @@ -239,7 +239,7 @@ pub fn parseAfterScheme(scheme: []const u8, text: []const u8) ParseError!Uri { |
| 239 | | 239 | |
| 240 | if (start_of_host >= end_of_host) return error.InvalidFormat; | 240 | if (start_of_host >= end_of_host) return error.InvalidFormat; |
| 241 | const host = authority[start_of_host..end_of_host]; | 241 | const host = authority[start_of_host..end_of_host]; |
| 242 | if (host.len > HostName.max_len) return error.InvalidHostName; | 242 | if (host.len > std.Io.net.HostName.max_len) return error.InvalidHostName; |
| 243 | uri.host = .{ .percent_encoded = host }; | 243 | uri.host = .{ .percent_encoded = host }; |
| 244 | } | 244 | } |
| 245 | | 245 | |
| ... | @@ -559,7 +559,7 @@ test "should fail gracefully" { | ... | @@ -559,7 +559,7 @@ test "should fail gracefully" { |
| 559 | } | 559 | } |
| 560 | | 560 | |
| 561 | test "parse name too long" { | 561 | test "parse name too long" { |
| 562 | const uri = "http://" ++ @as([HostName.max_len + 1]u8, @splat('Z')); | 562 | const uri = "http://" ++ @as([std.Io.net.HostName.max_len + 1]u8, @splat('Z')); |
| 563 | try std.testing.expectError(error.InvalidHostName, parse(uri)); | 563 | try std.testing.expectError(error.InvalidHostName, parse(uri)); |
| 564 | } | 564 | } |
| 565 | | 565 | |