awc panics if redirected to an IP address (not a DNS name) when using rustls #2100
Closed
Description
Expected Behavior
No way for the remote server to induce a panic in the actix-web HTTP client.
Current Behavior
On some websites, e.g. terbit21.wtf, awc panics with the following error:
terbit21.wtf:thread 'main' panicked at 'rustls currently only handles hostname-based connections. See briansmith/webpki#54: InvalidDNSNameError', /home/shnatsel/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-tls-3.0.0-beta.4/src/connect/ssl/rustls.rs:91:14
Steps to Reproduce (for bugs)
git clone https://github.com/Shnatsel/rust-http-clients-smoke-test
cd rust-http-clients-smoke-test/awc
cargo build --release
target/release/awc-smoke-test terbit21.wtf
Context
I am testing a bunch of HTTP clients on the top million websites according to the Feb 3 Tranco list.
Your Environment
Linux, Ubuntu 20.04 LTS
- Rust Version (I.e, output of
rustc -V
): rustc 1.47.0 (18bf6b4f0 2020-10-07) - Actix Web Version: awc 3.0.0-beta.3