Skip to content

Commit

Permalink
Fixed typos in object store (#5629)
Browse files Browse the repository at this point in the history
Solved some local error in spelling of local variables. Note that a spell checker was used and all the references to the old (wrong spelling) have been corrected.

Co-authored-by: Giovanni Manfredi <giovanni@logicalclocks.com>
  • Loading branch information
Silemo and Giovanni Manfredi committed Apr 11, 2024
1 parent 36a6e51 commit a15adf6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions object_store/src/gcp/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub struct GoogleCloudStorageBuilder {
/// Credentials
credentials: Option<GcpCredentialProvider>,
/// Credentials for sign url
signing_cedentials: Option<GcpSigningCredentialProvider>,
signing_credentials: Option<GcpSigningCredentialProvider>,
}

/// Configuration keys for [`GoogleCloudStorageBuilder`]
Expand Down Expand Up @@ -209,7 +209,7 @@ impl Default for GoogleCloudStorageBuilder {
client_options: ClientOptions::new().with_allow_http(true),
url: None,
credentials: None,
signing_cedentials: None,
signing_credentials: None,
}
}
}
Expand Down Expand Up @@ -491,7 +491,7 @@ impl GoogleCloudStorageBuilder {
)) as _
};

let signing_credentials = if let Some(signing_credentials) = self.signing_cedentials {
let signing_credentials = if let Some(signing_credentials) = self.signing_credentials {
signing_credentials
} else if disable_oauth {
Arc::new(StaticCredentialProvider::new(GcpSigningCredential {
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/gcp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ enum Error {
#[snafu(display("Error signing blob: {}", source))]
SignBlobRequest { source: crate::client::retry::Error },

#[snafu(display("Got invalid signing blob repsonse: {}", source))]
#[snafu(display("Got invalid signing blob response: {}", source))]
InvalidSignBlobResponse { source: reqwest::Error },

#[snafu(display("Got invalid signing blob signature: {}", source))]
Expand Down
12 changes: 6 additions & 6 deletions object_store/src/gcp/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,15 +719,15 @@ impl GCSAuthorizer {
///```
///
/// <https://cloud.google.com/storage/docs/authentication/canonical-requests>
fn canonicalize_request(url: &Url, methond: &Method, headers: &HeaderMap) -> String {
let verb = methond.as_str();
fn canonicalize_request(url: &Url, method: &Method, headers: &HeaderMap) -> String {
let verb = method.as_str();
let path = url.path();
let query = Self::canonicalize_query(url);
let (canaonical_headers, signed_headers) = Self::canonicalize_headers(headers);
let (canonical_headers, signed_headers) = Self::canonicalize_headers(headers);

format!(
"{}\n{}\n{}\n{}\n\n{}\n{}",
verb, path, query, canaonical_headers, signed_headers, DEFAULT_GCS_PLAYLOAD_STRING
verb, path, query, canonical_headers, signed_headers, DEFAULT_GCS_PLAYLOAD_STRING
)
}

Expand Down Expand Up @@ -794,8 +794,8 @@ impl GCSAuthorizer {
url: &Url,
headers: &HeaderMap,
) -> String {
let caninical_request = Self::canonicalize_request(url, request_method, headers);
let hashed_canonical_req = hex_digest(caninical_request.as_bytes());
let canonical_request = Self::canonicalize_request(url, request_method, headers);
let hashed_canonical_req = hex_digest(canonical_request.as_bytes());
let scope = self.scope(date);

format!(
Expand Down

0 comments on commit a15adf6

Please sign in to comment.