kopia lustrzana https://github.com/gaul/s3proxy
Make S3Proxy compatible with ExAws by checking for parameter presence
rodzic
11868c22cc
commit
0c3d81feb2
|
@ -673,16 +673,16 @@ public class S3ProxyHandler {
|
||||||
handleContainerList(response, blobStore);
|
handleContainerList(response, blobStore);
|
||||||
return;
|
return;
|
||||||
} else if (path.length <= 2 || path[2].isEmpty()) {
|
} else if (path.length <= 2 || path[2].isEmpty()) {
|
||||||
if ("".equals(request.getParameter("acl"))) {
|
if (request.getParameter("acl") != null) {
|
||||||
handleGetContainerAcl(response, blobStore, path[1]);
|
handleGetContainerAcl(response, blobStore, path[1]);
|
||||||
return;
|
return;
|
||||||
} else if ("".equals(request.getParameter("location"))) {
|
} else if (request.getParameter("location") != null) {
|
||||||
handleContainerLocation(response);
|
handleContainerLocation(response);
|
||||||
return;
|
return;
|
||||||
} else if ("".equals(request.getParameter("policy"))) {
|
} else if (request.getParameter("policy") != null) {
|
||||||
handleBucketPolicy(blobStore, path[1]);
|
handleBucketPolicy(blobStore, path[1]);
|
||||||
return;
|
return;
|
||||||
} else if ("".equals(request.getParameter("uploads"))) {
|
} else if (request.getParameter("uploads") != null) {
|
||||||
handleListMultipartUploads(request, response, blobStore,
|
handleListMultipartUploads(request, response, blobStore,
|
||||||
path[1]);
|
path[1]);
|
||||||
return;
|
return;
|
||||||
|
@ -690,7 +690,7 @@ public class S3ProxyHandler {
|
||||||
handleBlobList(request, response, blobStore, path[1]);
|
handleBlobList(request, response, blobStore, path[1]);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if ("".equals(request.getParameter("acl"))) {
|
if (request.getParameter("acl") != null) {
|
||||||
handleGetBlobAcl(response, blobStore, path[1],
|
handleGetBlobAcl(response, blobStore, path[1],
|
||||||
path[2]);
|
path[2]);
|
||||||
return;
|
return;
|
||||||
|
@ -713,10 +713,10 @@ public class S3ProxyHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case "POST":
|
case "POST":
|
||||||
if ("".equals(request.getParameter("delete"))) {
|
if (request.getParameter("delete") != null) {
|
||||||
handleMultiBlobRemove(response, is, blobStore, path[1]);
|
handleMultiBlobRemove(response, is, blobStore, path[1]);
|
||||||
return;
|
return;
|
||||||
} else if ("".equals(request.getParameter("uploads"))) {
|
} else if (request.getParameter("uploads") != null) {
|
||||||
handleInitiateMultipartUpload(request, response, blobStore,
|
handleInitiateMultipartUpload(request, response, blobStore,
|
||||||
path[1], path[2]);
|
path[1], path[2]);
|
||||||
return;
|
return;
|
||||||
|
@ -729,7 +729,7 @@ public class S3ProxyHandler {
|
||||||
break;
|
break;
|
||||||
case "PUT":
|
case "PUT":
|
||||||
if (path.length <= 2 || path[2].isEmpty()) {
|
if (path.length <= 2 || path[2].isEmpty()) {
|
||||||
if ("".equals(request.getParameter("acl"))) {
|
if (request.getParameter("acl") != null) {
|
||||||
handleSetContainerAcl(request, response, is, blobStore,
|
handleSetContainerAcl(request, response, is, blobStore,
|
||||||
path[1]);
|
path[1]);
|
||||||
return;
|
return;
|
||||||
|
@ -751,7 +751,7 @@ public class S3ProxyHandler {
|
||||||
path[2]);
|
path[2]);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if ("".equals(request.getParameter("acl"))) {
|
if (request.getParameter("acl") != null) {
|
||||||
handleSetBlobAcl(request, response, is, blobStore, path[1],
|
handleSetBlobAcl(request, response, is, blobStore, path[1],
|
||||||
path[2]);
|
path[2]);
|
||||||
return;
|
return;
|
||||||
|
|
Ładowanie…
Reference in New Issue