Skip to content

Commit

Permalink
fix(serivces/gcs): Gcs doesn't support read with if_(un)modified_since (
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuanwo authored Jan 13, 2025
1 parent f951963 commit 85c3803
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions core/src/services/gcs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,6 @@ impl Access for GcsBackend {

read_with_if_match: true,
read_with_if_none_match: true,
read_with_if_modified_since: true,
read_with_if_unmodified_since: true,

write: true,
write_can_empty: true,
Expand Down
14 changes: 0 additions & 14 deletions core/src/services/gcs/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,6 @@ impl GcsCore {
req = req.header(http::header::RANGE, range.to_header());
}

if let Some(if_modified_since) = args.if_modified_since() {
req = req.header(
IF_MODIFIED_SINCE,
format_datetime_into_http_date(if_modified_since),
);
}

if let Some(if_unmodified_since) = args.if_unmodified_since() {
req = req.header(
IF_UNMODIFIED_SINCE,
format_datetime_into_http_date(if_unmodified_since),
);
}

let req = req.body(Buffer::new()).map_err(new_request_build_error)?;

Ok(req)
Expand Down

0 comments on commit 85c3803

Please sign in to comment.