mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix: for no-such-key with non-ascii key (#112)
This commit is contained in:
1 parent
68b8ed883a
commit
ab072cf660
2 files changed
+176
-137
No files matched your search
@@ -25,6 +25,7 @@ import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.UriInfo;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneId;
|
||||
@@ -1053,7 +1054,7 @@ public class S3Controller {
|
||||
throw new AwsException("InvalidArgument", "Invalid copy source: " + copySource, 400);
|
||||
}
|
||||
String sourceBucket = source.substring(0, slashIndex);
|
||||
String sourceKey = source.substring(slashIndex + 1);
|
||||
String sourceKey = URLDecoder.decode(source.substring(slashIndex + 1), StandardCharsets.UTF_8);
|
||||
|
||||
S3Object copy = s3Service.copyObject(sourceBucket, sourceKey, destBucket, destKey,
|
||||
httpHeaders.getHeaderString("x-amz-metadata-directive"),
|
||||
|
||||
Reference in new issue
Block a user