kopia lustrzana https://github.com/gaul/s3proxy
Explicitly handle get location
rodzic
d33324797a
commit
807f6ef47c
|
@ -277,6 +277,10 @@ final class S3ProxyHandler extends AbstractHandler {
|
|||
handleContainerOrBlobAcl(response, path[1]);
|
||||
baseRequest.setHandled(true);
|
||||
return;
|
||||
} else if ("".equals(request.getParameter("location"))) {
|
||||
handleContainerLocation(response, path[1]);
|
||||
baseRequest.setHandled(true);
|
||||
return;
|
||||
}
|
||||
handleBlobList(request, response, path[1]);
|
||||
baseRequest.setHandled(true);
|
||||
|
@ -400,6 +404,16 @@ final class S3ProxyHandler extends AbstractHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private void handleContainerLocation(HttpServletResponse response,
|
||||
String containerName) throws IOException {
|
||||
try (Writer writer = response.getWriter()) {
|
||||
// TODO: using us-standard semantics but could emit actual location
|
||||
writer.write(XML_PROLOG +
|
||||
"<LocationConstraint " + AWS_XMLNS + "/>");
|
||||
writer.flush();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleContainerExists(HttpServletResponse response,
|
||||
String containerName) throws IOException {
|
||||
if (!blobStore.containerExists(containerName)) {
|
||||
|
|
Ładowanie…
Reference in New Issue