S3 doesn't work with literal IPv6 hosts
オープン
- 主要言語
- Python
- スター
- 22
- フォーク
- 16
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 4
説明
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](https://min.io/) and IPv6.
The exact reason of the failure is here:
https://github.com/Aiven-Open/rohmu/blob/a9aea97c841a42aa38b9e3870f37333e6fdd3dae/rohmu/object_storage/s3.py#L155
According to [RFC 2732](https://www.ietf.org/rfc/rfc2732.txt)
> 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.
```python
custom_url = f"{scheme}://[{host}]:{port}"
```
コントリビューションガイド
評価
この issue はまだ評価されていません。