Skip to content

Commit

Permalink
fix: oss will not use the port (#4899)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lzzzzzt authored Jul 15, 2024
1 parent b9f7c21 commit 60fd3eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/services/oss/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ impl OssBuilder {
.with_context("service", Scheme::Oss)
.with_context("endpoint", &ep)
})?;
let full_host = format!("{bucket}.{host}");
let full_host = if let Some(port) = uri.port_u16() {
format!("{bucket}.{host}:{port}")
} else {
format!("{bucket}.{host}")
};
let endpoint = match uri.scheme_str() {
Some(scheme_str) => match scheme_str {
"http" | "https" => format!("{scheme_str}://{full_host}"),
Expand Down

0 comments on commit 60fd3eb

Please sign in to comment.