You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/01 12:03:21 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #2782: Handle S3 virtual host request type

tustvold commented on code in PR #2782:
URL: https://github.com/apache/arrow-rs/pull/2782#discussion_r985090333


##########
object_store/src/aws/mod.rs:
##########
@@ -455,6 +459,23 @@ impl AmazonS3Builder {
         self
     }
 
+    /// Sets if virtual hosted style request has to be used.
+    /// If `virtual_hosted_request_style` is :
+    /// * false (default):  Path style request is used
+    /// * true:  Virtual hosted style request is used
+    ///
+    /// If the `endpoint` is provided then it should be
+    /// consistent with `virtual_hosted_request_style`.
+    /// i.e. if `virutal_hosted_request_style` is set to true
+    /// then `endpoint` should have bucket name on it.

Review Comment:
   ```suggestion
       /// then `endpoint` should have bucket name included.
   ```



##########
object_store/src/aws/mod.rs:
##########
@@ -541,14 +562,29 @@ impl AmazonS3Builder {
             },
         };
 
-        let endpoint = self
-            .endpoint
-            .unwrap_or_else(|| format!("https://s3.{}.amazonaws.com", region));
+        let endpoint: String;
+        let bucket_endpoint: String;
+
+        //If `endpoint` is provided then its assumed to be consistent with
+        // `virutal_hosted_style_request`. i.e. if `virtual_hosted_request_style` is true then

Review Comment:
   ```suggestion
           // `virutal_hosted_request_style`. i.e. if `virtual_hosted_request_style` is true then
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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