kopia lustrzana https://github.com/gaul/s3proxy
Handle zero-length multi-part upload
rodzic
6d5f380590
commit
0337a4e4bc
|
@ -50,6 +50,9 @@ enum S3ErrorCode {
|
|||
" more information about Regions, see How to Select" +
|
||||
" a Region for Your Buckets."),
|
||||
INVALID_REQUEST(HttpServletResponse.SC_BAD_REQUEST, "Bad Request"),
|
||||
MALFORMED_X_M_L(HttpServletResponse.SC_BAD_REQUEST,
|
||||
"The XML you provided was not well-formed or did not validate" +
|
||||
" against our published schema."),
|
||||
METHOD_NOT_ALLOWED(HttpServletResponse.SC_METHOD_NOT_ALLOWED,
|
||||
"Method Not Allowed"),
|
||||
MISSING_CONTENT_LENGTH(HttpServletResponse.SC_LENGTH_REQUIRED,
|
||||
|
|
|
@ -1363,6 +1363,13 @@ final class S3ProxyHandler extends AbstractHandler {
|
|||
totalContentLength += contentLength;
|
||||
}
|
||||
|
||||
if (partNames.isEmpty()) {
|
||||
// Amazon requires at least one part
|
||||
sendSimpleErrorResponse(response,
|
||||
S3ErrorCode.MALFORMED_X_M_L);
|
||||
return;
|
||||
}
|
||||
|
||||
BlobMetadata blobMetadata = blobStore.blobMetadata(
|
||||
containerName, uploadId);
|
||||
ContentMetadata contentMetadata =
|
||||
|
|
Ładowanie…
Reference in New Issue