Emit BadDigest for mismatched MD5 hash

S3 uses InvalidDigest for a malformed MD5 hash.
pull/16/head
Andrew Gaul 2014-08-23 15:40:16 -07:00
rodzic d74a409f87
commit 820b884169
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ import com.google.common.base.Preconditions;
*/
enum S3ErrorCode {
ACCESS_DENIED(HttpServletResponse.SC_FORBIDDEN, "Forbidden"),
BAD_DIGEST(HttpServletResponse.SC_BAD_REQUEST, "Bad Request"),
BUCKET_ALREADY_EXISTS(HttpServletResponse.SC_FORBIDDEN,
"The requested bucket name is not available." +
" The bucket namespace is shared by all users of the system." +

Wyświetl plik

@ -780,7 +780,7 @@ final class S3ProxyHandler extends AbstractHandler {
case HttpServletResponse.SC_BAD_REQUEST:
case 422: // Swift returns 422 Unprocessable Entity
sendSimpleErrorResponse(response,
S3ErrorCode.INVALID_DIGEST);
S3ErrorCode.BAD_DIGEST);
break;
default:
// TODO: emit hre.getContent() ?