kopia lustrzana https://github.com/gaul/s3proxy
Emit BadDigest for mismatched MD5 hash
S3 uses InvalidDigest for a malformed MD5 hash.pull/16/head
rodzic
d74a409f87
commit
820b884169
|
@ -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." +
|
||||
|
|
|
@ -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() ?
|
||||
|
|
Ładowanie…
Reference in New Issue