You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2025/01/13 04:28:57 UTC

(opendal) 01/01: fix(serivces/gcs): Gcs doesn't support read with if_(un)modified_since

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch gcs-not-support-if-modified
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit a7c73b64d6fd0284fde6cf850a228848fc718f3b
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Mon Jan 13 12:28:19 2025 +0800

    fix(serivces/gcs): Gcs doesn't support read with if_(un)modified_since
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 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 d9b401ba8..c61ff75ca 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 7a7ef5992..3e06bf03b 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)