Skip to content

Commit f76331f

Browse files
committed
Use the /dns protocol in websocket redirects
The whole thing with back-translating from an redirect URL looks a bit baroque, but at least now the transport does not completely ignore IPv6 addresses resolved from a hostname in a redirect URL.
1 parent c02bf8d commit f76331f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transports/websocket/src/framed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ fn location_to_multiaddr<T>(location: &str) -> Result<Multiaddr, Error<T>> {
373373
let mut a = Multiaddr::empty();
374374
match url.host() {
375375
Some(url::Host::Domain(h)) => {
376-
a.push(Protocol::Dns4(h.into()))
376+
a.push(Protocol::Dns(h.into()))
377377
}
378378
Some(url::Host::Ipv4(ip)) => {
379379
a.push(Protocol::Ip4(ip))

0 commit comments

Comments
 (0)