From fbb7befb92d5add81378b498a07494bfe064c3e9 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Fri, 24 Oct 2025 09:56:06 +0200 Subject: [PATCH] Accept lowercase encoded hex values in URIs Added test case and updated Specification references. --- src/uri.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/uri.rs b/src/uri.rs index 6b7d706..f066eab 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -1030,4 +1030,16 @@ mod tests { let uri = format!("//{}/A100/1/6501", host_name); assert!(UUri::from_str(&uri).is_err()); } + + // [utest->dsn~uri-path-mapping~2] + #[test] + fn test_from_str_accepts_lowercase_hex_encoding() { + let result = UUri::try_from("up://vin/ffff0abc/a1/bcd1"); + assert!(result.is_ok_and(|uuri| { + uuri.authority_name == "vin" + && uuri.ue_id == 0xFFFF0ABC + && uuri.ue_version_major == 0xA1 + && uuri.resource_id == 0xBCD1 + })); + } }