Skip to content

Uri::host with an IPv6 returns the IP without brackets #291

Description

@seanmonstar

The host part of a URI with an IPv6 authority should include the brackets.

let uri = "http://[::1]/".parse::<Uri>().unwrap();

Expected:

assert_eq!(uri.host(), Some("[::1]"));

Actual:

assert_eq!(uri.host(), Some("::1"));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-uriArea: Uri and partsE-easyEffort: easy. Start here :DS-bugSeverity: bug. Something is wrong!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions