kopia lustrzana https://github.com/gaul/s3proxy
rodzic
3b2bd615a0
commit
40c4d099d9
|
@ -438,6 +438,22 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
options.publicRead();
|
options.publicRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String contentLengthString = request.getHeader(
|
||||||
|
HttpHeaders.CONTENT_LENGTH);
|
||||||
|
if (contentLengthString != null) {
|
||||||
|
long contentLength;
|
||||||
|
try {
|
||||||
|
contentLength = Long.parseLong(contentLengthString);
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
sendSimpleErrorResponse(response, S3ErrorCode.INVALID_ARGUMENT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (contentLength < 0) {
|
||||||
|
sendSimpleErrorResponse(response, S3ErrorCode.INVALID_ARGUMENT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (blobStore.createContainerInLocation(location, containerName,
|
if (blobStore.createContainerInLocation(location, containerName,
|
||||||
options)) {
|
options)) {
|
||||||
|
|
Ładowanie…
Reference in New Issue