aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/k2v/api_server.rs2
-rw-r--r--src/api/router_macros.rs2
-rw-r--r--src/api/s3/checksum.rs4
-rw-r--r--src/api/s3/copy.rs2
-rw-r--r--src/api/s3/list.rs4
-rw-r--r--src/api/s3/post_object.rs2
-rw-r--r--src/api/s3/website.rs2
-rw-r--r--src/api/signature/payload.rs8
8 files changed, 13 insertions, 13 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs
index 658cfcc8..f2a3942e 100644
--- a/src/api/k2v/api_server.rs
+++ b/src/api/k2v/api_server.rs
@@ -77,7 +77,7 @@ impl ApiHandler for K2VApiServer {
} = endpoint;
let garage = self.garage.clone();
- // The OPTIONS method is procesed early, before we even check for an API key
+ // The OPTIONS method is processed early, before we even check for an API key
if let Endpoint::Options = endpoint {
let options_res = handle_options_api(garage, &req, Some(bucket_name))
.await
diff --git a/src/api/router_macros.rs b/src/api/router_macros.rs
index cfecbc92..8f10a4f5 100644
--- a/src/api/router_macros.rs
+++ b/src/api/router_macros.rs
@@ -204,7 +204,7 @@ macro_rules! generateQueryParameters {
}
/// Get an error message in case not all parameters where used when extracting them to
- /// build an Enpoint variant
+ /// build an Endpoint variant
fn nonempty_message(&self) -> Option<&str> {
if self.keyword.is_some() {
Some("Keyword not used")
diff --git a/src/api/s3/checksum.rs b/src/api/s3/checksum.rs
index c9dc001c..c7527163 100644
--- a/src/api/s3/checksum.rs
+++ b/src/api/s3/checksum.rs
@@ -340,8 +340,8 @@ pub(crate) fn request_checksum_value(
Ok(ret.pop())
}
-/// Checks for the presense of x-amz-checksum-algorithm
-/// if so extract the corrseponding x-amz-checksum-* value
+/// Checks for the presence of x-amz-checksum-algorithm
+/// if so extract the corresponding x-amz-checksum-* value
pub(crate) fn request_checksum_algorithm_value(
headers: &HeaderMap<HeaderValue>,
) -> Result<Option<ChecksumValue>, Error> {
diff --git a/src/api/s3/copy.rs b/src/api/s3/copy.rs
index 411a6917..e375a714 100644
--- a/src/api/s3/copy.rs
+++ b/src/api/s3/copy.rs
@@ -63,7 +63,7 @@ pub async fn handle_copy(
let source_checksum_algorithm = source_checksum.map(|x| x.algorithm());
// If source object has a checksum, the destination object must as well.
- // The x-amz-checksum-algorihtm header allows to change that algorithm,
+ // The x-amz-checksum-algorithm header allows to change that algorithm,
// but if it is absent, we must use the same as before
let checksum_algorithm = checksum_algorithm.or(source_checksum_algorithm);
diff --git a/src/api/s3/list.rs b/src/api/s3/list.rs
index 648bace2..68d6cbe6 100644
--- a/src/api/s3/list.rs
+++ b/src/api/s3/list.rs
@@ -398,7 +398,7 @@ enum ExtractionResult {
key: String,
},
// Fallback key is used for legacy APIs that only support
- // exlusive pagination (and not inclusive one).
+ // exclusive pagination (and not inclusive one).
SkipTo {
key: String,
fallback_key: Option<String>,
@@ -408,7 +408,7 @@ enum ExtractionResult {
#[derive(PartialEq, Clone, Debug)]
enum RangeBegin {
// Fallback key is used for legacy APIs that only support
- // exlusive pagination (and not inclusive one).
+ // exclusive pagination (and not inclusive one).
IncludingKey {
key: String,
fallback_key: Option<String>,
diff --git a/src/api/s3/post_object.rs b/src/api/s3/post_object.rs
index ff2361f1..725f3847 100644
--- a/src/api/s3/post_object.rs
+++ b/src/api/s3/post_object.rs
@@ -213,7 +213,7 @@ pub async fn handle_post_object(
}
// if we ever start supporting ACLs, we likely want to map "acl" to x-amz-acl" somewhere
- // arround here to make sure the rest of the machinery takes our acl into account.
+ // around here to make sure the rest of the machinery takes our acl into account.
let headers = get_headers(&params)?;
let expected_checksums = ExpectedChecksums {
diff --git a/src/api/s3/website.rs b/src/api/s3/website.rs
index 6af55677..fa36bc32 100644
--- a/src/api/s3/website.rs
+++ b/src/api/s3/website.rs
@@ -276,7 +276,7 @@ impl Redirect {
return Err(Error::bad_request("Bad XML: invalid protocol"));
}
}
- // TODO there are probably more invalide cases, but which ones?
+ // TODO there are probably more invalid cases, but which ones?
Ok(())
}
}
diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs
index d6ff62f0..9e5a6043 100644
--- a/src/api/signature/payload.rs
+++ b/src/api/signature/payload.rs
@@ -47,8 +47,8 @@ pub async fn check_payload_signature(
let query = parse_query_map(request.uri())?;
if query.contains_key(&X_AMZ_ALGORITHM) {
- // We check for presigned-URL-style authentification first, because
- // the browser or someting else could inject an Authorization header
+ // We check for presigned-URL-style authentication first, because
+ // the browser or something else could inject an Authorization header
// that is totally unrelated to AWS signatures.
check_presigned_signature(garage, service, request, query).await
} else if request.headers().contains_key(AUTHORIZATION) {
@@ -132,7 +132,7 @@ async fn check_presigned_signature(
let authorization = Authorization::parse_presigned(&algorithm.value, &query)?;
// Verify that all necessary request headers are included in signed_headers
- // For AWSv4 pre-signed URLs, the following must be incldued:
+ // For AWSv4 pre-signed URLs, the following must be included:
// - the Host header (mandatory)
// - all x-amz-* headers used in the request
let signed_headers = split_signed_headers(&authorization)?;
@@ -306,7 +306,7 @@ pub fn canonical_request(
// Note that there is also the issue of path normalization, which I hope is unrelated to the
// one of URI-encoding. At least in aws-sigv4 both parameters can be set independently,
// and rusoto_signature does not seem to do any effective path normalization, even though
- // it mentions it in the comments (same link to the souce code as above).
+ // it mentions it in the comments (same link to the source code as above).
// We make the explicit choice of NOT normalizing paths in the K2V API because doing so
// would make non-normalized paths invalid K2V partition keys, and we don't want that.
let canonical_uri: std::borrow::Cow<str> = if service != "s3" {