Skip to content

Commit

Permalink
fix(s3): path-style-access means no virtual-host (#944)
Browse files Browse the repository at this point in the history
Hi, I noticed that this boolean check was inverted, it applied virtual
host style access if path style access was true and vice-versa.
  • Loading branch information
twuebi authored Feb 4, 2025
1 parent c754e27 commit 6e2ef32
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/iceberg/src/io/storage_s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ pub(crate) fn s3_config_parse(mut m: HashMap<String, String>) -> Result<S3Config
cfg.region = Some(region);
};
if let Some(path_style_access) = m.remove(S3_PATH_STYLE_ACCESS) {
if is_truthy(path_style_access.to_lowercase().as_str()) {
cfg.enable_virtual_host_style = true;
}
cfg.enable_virtual_host_style = !is_truthy(path_style_access.to_lowercase().as_str());
};
if let Some(arn) = m.remove(S3_ASSUME_ROLE_ARN) {
cfg.role_arn = Some(arn);
Expand Down

0 comments on commit 6e2ef32

Please sign in to comment.