Skip to content

Commit

Permalink
Use the /dns protocol in websocket redirects
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mzabaluev committed May 14, 2020
1 parent c02bf8d commit f76331f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transports/websocket/src/framed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ fn location_to_multiaddr<T>(location: &str) -> Result<Multiaddr, Error<T>> {
let mut a = Multiaddr::empty();
match url.host() {
Some(url::Host::Domain(h)) => {
a.push(Protocol::Dns4(h.into()))
a.push(Protocol::Dns(h.into()))
}
Some(url::Host::Ipv4(ip)) => {
a.push(Protocol::Ip4(ip))
Expand Down

0 comments on commit f76331f

Please sign in to comment.