Emit NoSuchBucket on getBlob

pull/16/head
Andrew Gaul 2014-07-31 16:05:29 -07:00
rodzic d8005054a0
commit 84c33c9b42
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -495,7 +495,15 @@ final class S3ProxyHandler extends AbstractHandler {
Long.parseLong(ranges[1]));
}
Blob blob = blobStore.getBlob(containerName, blobName, options);
Blob blob;
try {
blob = blobStore.getBlob(containerName, blobName, options);
} catch (ContainerNotFoundException cnfe) {
sendSimpleErrorResponse(response,
HttpServletResponse.SC_NOT_FOUND, "NoSuchBucket",
"Not Found");
return;
}
if (blob == null) {
sendSimpleErrorResponse(response,
HttpServletResponse.SC_NOT_FOUND, "NoSuchKey",