Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/services/s3/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,14 +619,15 @@ impl S3Builder {
);

match res.status() {
StatusCode::OK | StatusCode::FORBIDDEN | StatusCode::MOVED_PERMANENTLY => {
StatusCode::OK | StatusCode::MOVED_PERMANENTLY => {
let region = res.headers().get("x-amz-bucket-region")?;
if let Ok(regin) = region.to_str() {
Some(regin.to_string())
} else {
None
}
}
StatusCode::FORBIDDEN => Some("us-east-1".to_string()),
Comment thread
Xuanwo marked this conversation as resolved.
// Unexpected status code
_ => None,
}
Expand Down