kopia lustrzana https://github.com/gaul/s3proxy
Emit NoSuchBucket on write to non-existent bucket
Found with Ceph s3-tests. References #5.pull/16/head
rodzic
b603abefc8
commit
1284c91e37
|
@ -572,6 +572,11 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
try {
|
try {
|
||||||
String eTag = blobStore.putBlob(containerName, builder.build());
|
String eTag = blobStore.putBlob(containerName, builder.build());
|
||||||
response.addHeader(HttpHeaders.ETAG, "\"" + eTag + "\"");
|
response.addHeader(HttpHeaders.ETAG, "\"" + eTag + "\"");
|
||||||
|
} catch (ContainerNotFoundException cnfe) {
|
||||||
|
sendSimpleErrorResponse(response,
|
||||||
|
HttpServletResponse.SC_NOT_FOUND, "NoSuchBucket",
|
||||||
|
"Not Found", Optional.<String>absent());
|
||||||
|
return;
|
||||||
} catch (HttpResponseException hre) {
|
} catch (HttpResponseException hre) {
|
||||||
int status = hre.getResponse().getStatusCode();
|
int status = hre.getResponse().getStatusCode();
|
||||||
if (status == HttpServletResponse.SC_BAD_REQUEST) {
|
if (status == HttpServletResponse.SC_BAD_REQUEST) {
|
||||||
|
|
Ładowanie…
Reference in New Issue