Strip leading / from x-amz-copy-source header

Previously S3Proxy did not update copySourceHeader.  Fixes #10.
pull/16/head
Andrew Gaul 2014-08-13 15:24:31 -07:00
rodzic e59e2660dd
commit 73d647f46e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -553,7 +553,7 @@ final class S3ProxyHandler extends AbstractHandler {
String copySourceHeader = request.getHeader("x-amz-copy-source");
if (copySourceHeader.startsWith("/")) {
// Some clients like boto do not include the leading slash
copySourceHeader.substring(1);
copySourceHeader = copySourceHeader.substring(1);
}
String[] path = copySourceHeader.split("/", 2);
String sourceContainerName = path[0];