Skip to content

S3 doesn't work with literal IPv6 hosts  #159

@juha-aiven

Description

@juha-aiven

When using S3Transfer with host being an IPv6 address such as ::1 Rohmu fails. This can happen when using a "non-S3 S3" such as MinIO and IPv6.

The exact reason of the failure is here:

custom_url = f"{scheme}://{host}:{port}"

According to RFC 2732

To use a literal IPv6 address in a URL, the literal address should be enclosed in "[" and "]" characters.

Obviously, the code doesn't do this.

I tried with a simple change and Rohmu seems to work.

            custom_url = f"{scheme}://[{host}]:{port}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions