From 85c380357a53d3ba9f09f12d1eb8717728bc8406 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 13 Jan 2025 12:44:23 +0800 Subject: [PATCH] fix(serivces/gcs): Gcs doesn't support read with if_(un)modified_since (#5537) --- core/src/services/gcs/backend.rs | 2 -- core/src/services/gcs/core.rs | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/core/src/services/gcs/backend.rs b/core/src/services/gcs/backend.rs index d9b401ba8cfb..c61ff75ca290 100644 --- a/core/src/services/gcs/backend.rs +++ b/core/src/services/gcs/backend.rs @@ -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, diff --git a/core/src/services/gcs/core.rs b/core/src/services/gcs/core.rs index 7a7ef5992fde..3e06bf03b575 100644 --- a/core/src/services/gcs/core.rs +++ b/core/src/services/gcs/core.rs @@ -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)