kopia lustrzana https://github.com/gaul/s3proxy
rodzic
d6c81c9b64
commit
2eaf7de68f
|
@ -1813,7 +1813,8 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
partSize != -1 && it.hasNext()) {
|
partSize != -1 && it.hasNext()) {
|
||||||
throw new S3Exception(S3ErrorCode.ENTITY_TOO_SMALL);
|
throw new S3Exception(S3ErrorCode.ENTITY_TOO_SMALL);
|
||||||
}
|
}
|
||||||
if (!equalsIgnoringSurroundingQuotes(part.partETag(),
|
if (part.partETag() != null &&
|
||||||
|
!equalsIgnoringSurroundingQuotes(part.partETag(),
|
||||||
entry.getValue())) {
|
entry.getValue())) {
|
||||||
throw new S3Exception(S3ErrorCode.INVALID_PART);
|
throw new S3Exception(S3ErrorCode.INVALID_PART);
|
||||||
}
|
}
|
||||||
|
@ -2117,7 +2118,9 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
writeSimpleElement(xml, "LastModified",
|
writeSimpleElement(xml, "LastModified",
|
||||||
blobStore.getContext().utils().date()
|
blobStore.getContext().utils().date()
|
||||||
.iso8601DateFormat(blobMetadata.getLastModified()));
|
.iso8601DateFormat(blobMetadata.getLastModified()));
|
||||||
|
if (eTag != null) {
|
||||||
writeSimpleElement(xml, "ETag", maybeQuoteETag(eTag));
|
writeSimpleElement(xml, "ETag", maybeQuoteETag(eTag));
|
||||||
|
}
|
||||||
|
|
||||||
xml.writeEndElement();
|
xml.writeEndElement();
|
||||||
xml.flush();
|
xml.flush();
|
||||||
|
@ -2234,10 +2237,12 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
|
|
||||||
MultipartPart part = blobStore.uploadMultipartPart(mpu,
|
MultipartPart part = blobStore.uploadMultipartPart(mpu,
|
||||||
partNumber, payload);
|
partNumber, payload);
|
||||||
|
if (part.partETag() != null) {
|
||||||
response.addHeader(HttpHeaders.ETAG,
|
response.addHeader(HttpHeaders.ETAG,
|
||||||
maybeQuoteETag(part.partETag()));
|
maybeQuoteETag(part.partETag()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void addMetadataToResponse(HttpServletResponse response,
|
private static void addMetadataToResponse(HttpServletResponse response,
|
||||||
BlobMetadata metadata) {
|
BlobMetadata metadata) {
|
||||||
|
|
Ładowanie…
Reference in New Issue