We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0c2aba commit dbf898aCopy full SHA for dbf898a
linkerd/addr/src/lib.rs
@@ -257,6 +257,22 @@ mod tests {
257
assert_eq!(a.is_loopback(), *expected_result, "{:?}", host)
258
}
259
260
+
261
+ #[test]
262
+ fn test_to_http_authority() {
263
+ let cases = &[
264
+ "localhost:80",
265
+ "localhost.:80",
266
+ "LocalhOsT.:80",
267
+ "mlocalhost.:80",
268
+ "localhost1.:80",
269
+ "127.0.0.1:80",
270
+ "[::1]:80",
271
+ ];
272
+ for host in cases {
273
+ Addr::from_str(host).unwrap().to_http_authority();
274
+ }
275
276
277
278
#[cfg(fuzzing)]
0 commit comments