You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "baszalmstra (via GitHub)" <gi...@apache.org> on 2023/03/30 09:42:39 UTC

[GitHub] [incubator-opendal] baszalmstra opened a new pull request, #1804: feat: add override_cache_control

baszalmstra opened a new pull request, #1804:
URL: https://github.com/apache/incubator-opendal/pull/1804

   Adds the ability to override the cache control headers when presigning get requests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo merged pull request #1804: feat: add override_cache_control

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #1804:
URL: https://github.com/apache/incubator-opendal/pull/1804


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1804: feat: add override_cache_control

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #1804:
URL: https://github.com/apache/incubator-opendal/pull/1804#discussion_r1153016277


##########
core/src/types/ops.rs:
##########
@@ -264,6 +265,17 @@ impl OpRead {
     pub fn override_content_disposition(&self) -> Option<&str> {
         self.override_content_disposition.as_deref()
     }
+
+    /// Sets the cache-control header that should be send back by the remote read operation.
+    pub fn with_override_cache_control(mut self, cache_control: impl Into<String>) -> Self {

Review Comment:
   Oh, I missed this. Please use `&str` directly instead of introducing generics in non-critical code paths.
   
   `with_override_content_disposition` should also be changed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on a diff in pull request #1804: feat: add override_cache_control

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on code in PR #1804:
URL: https://github.com/apache/incubator-opendal/pull/1804#discussion_r1153123366


##########
core/src/types/ops.rs:
##########
@@ -264,6 +265,17 @@ impl OpRead {
     pub fn override_content_disposition(&self) -> Option<&str> {
         self.override_content_disposition.as_deref()
     }
+
+    /// Sets the cache-control header that should be send back by the remote read operation.
+    pub fn with_override_cache_control(mut self, cache_control: impl Into<String>) -> Self {

Review Comment:
   Done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org