Skip to content

Method on Authority to get the host without [] for IPv6 addresses #830

@gaynor-anthropic

Description

@gaynor-anthropic

Right now Authority::host returns the hostname, dotted-ipv4-address, or []-surrounded-ipv6 address. However, for many use cases you don't want the [] for IPv6, they're part of the URI encoding, not the IP itself. Today's use case is transforming an HTTP Uri into a rustls-pki-type's ServerName, which doesn't accept the [] version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions