milestone 18: collapse duplicated infrastructure into shared listener core, crud list helper, resource shells, transport race, name and line helpers, ui modules
This commit is contained in:
@@ -192,6 +192,10 @@ const NameError = error{BadName};
|
||||
/// Lowercases over ASCII and strips one trailing dot. A byte ≥ 0x80 is
|
||||
/// rejected: query names reach the matcher ASCII-lowercased, so a pattern
|
||||
/// carrying a high byte could never match anything.
|
||||
///
|
||||
/// Deliberately not `dns.name.normalizeText`: a pattern may hold `*`, which
|
||||
/// `name.fromText` would reject, so this variant skips that check and rejects
|
||||
/// control bytes and space instead.
|
||||
fn normalize(text: []const u8, buf: *[types.max_name_len]u8) NameError![]const u8 {
|
||||
var rest = text;
|
||||
if (rest.len > 0 and rest[rest.len - 1] == '.') rest = rest[0 .. rest.len - 1];
|
||||
|
||||
Reference in New Issue
Block a user