Skip to content

awc panics if redirected to an IP address (not a DNS name) when using rustls #2100

Closed
actix/actix-net
#296
@Shnatsel

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)

  1. git clone https://github.com/Shnatsel/rust-http-clients-smoke-test
  2. cd rust-http-clients-smoke-test/awc
  3. cargo build --release
  4. 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

Metadata

Assignees

No one assigned

    Labels

    A-awcproject: awcC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions