kopia lustrzana https://github.com/gaul/s3proxy
Emit InvalidPart when missing an MPU part
rodzic
709d2b5f58
commit
ceb805ef0a
|
@ -49,6 +49,10 @@ enum S3ErrorCode {
|
|||
"The specified location constraint is not valid. For" +
|
||||
" more information about Regions, see How to Select" +
|
||||
" a Region for Your Buckets."),
|
||||
INVALID_PART(HttpServletResponse.SC_BAD_REQUEST,
|
||||
"One or more of the specified parts could not be found." +
|
||||
" The part may not have been uploaded, or the specified entity" +
|
||||
" tag may not match the part's entity tag."),
|
||||
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" +
|
||||
|
|
|
@ -1239,7 +1239,11 @@ final class S3ProxyHandler extends AbstractHandler {
|
|||
parseCompleteMultipartUpload(is).entrySet().iterator();
|
||||
it.hasNext();) {
|
||||
Map.Entry<Integer, String> entry = it.next();
|
||||
long partSize = partsByListing.get(entry.getKey()).partSize();
|
||||
MultipartPart part = partsByListing.get(entry.getKey());
|
||||
if (part == null) {
|
||||
throw new S3Exception(S3ErrorCode.INVALID_PART);
|
||||
}
|
||||
long partSize = part.partSize();
|
||||
if (partSize < blobStore.getMinimumMultipartPartSize() &&
|
||||
partSize != -1 && it.hasNext()) {
|
||||
throw new S3Exception(S3ErrorCode.ENTITY_TOO_SMALL);
|
||||
|
|
Ładowanie…
Reference in New Issue