Gargi-jais11 commented on code in PR #10586:
URL: https://github.com/apache/ozone/pull/10586#discussion_r3458179991


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/util/S3Utils.java:
##########
@@ -62,6 +62,17 @@ public static String urlEncode(String str)
     return URLEncoder.encode(str, UTF_8.name());
   }
 
+  /**
+   * Percent-encode a string for S3 {@code encoding-type=url} responses.
+   *
+   * <p>Unlike {@link URLEncoder} (application/x-www-form-urlencoded), AWS S3
+   * uses percent-encoding where spaces are {@code %20}, not {@code +}.
+   */
+  public static String s3urlEncode(String str)
+      throws UnsupportedEncodingException {
+    return urlEncode(str).replace("+", "%20");
+  }

Review Comment:
   Okay let me check and get back to u.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to