You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/12/13 17:57:19 UTC
[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2912: HDDS-6096. S3 copy object fails for source key with special char
bharatviswa504 commented on a change in pull request #2912:
URL: https://github.com/apache/ozone/pull/2912#discussion_r767993185
##########
File path: hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
##########
@@ -828,22 +832,29 @@ private CopyObjectResponse copyObject(String copyHeader,
}
int pos = header.indexOf('/');
if (pos == -1) {
- OS3Exception ex = S3ErrorTable.newError(S3ErrorTable
- .INVALID_ARGUMENT, header);
+ OS3Exception ex = S3ErrorTable.newError(INVALID_ARGUMENT, header);
ex.setErrorMessage("Copy Source must mention the source bucket and " +
"key: sourcebucket/sourcekey");
throw ex;
}
- return Pair.of(header.substring(0, pos), header.substring(pos + 1));
+ try {
+ String bucket = header.substring(0, pos);
Review comment:
Question:
What is the reason not to do urlDecode on the copyHeader if it is urlEncoded?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org