From e14e23be527be253352e93e1e9be9af8687aade4 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 17 Jul 2013 10:29:42 -0700 Subject: [PATCH] Revert "Add Atmos-specific MD5 checksum header" This reverts commit 98230e60a4e47c94ffe65f50470cf5ad51ca3f67. This succeeded in my tests but integration tests fail. --- .../jclouds/atmos/binders/BindMetadataToHeaders.java | 12 ------------ .../org/jclouds/atmos/reference/AtmosHeaders.java | 1 - .../atmos/blobstore/AtmosBlobRequestSignerTest.java | 7 +------ 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java index f0b3d06e13..ba852b7948 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/binders/BindMetadataToHeaders.java @@ -22,10 +22,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import javax.inject.Inject; import javax.inject.Singleton; -import com.google.common.io.BaseEncoding; - import org.jclouds.atmos.domain.AtmosObject; -import org.jclouds.atmos.reference.AtmosHeaders; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -50,15 +47,6 @@ public class BindMetadataToHeaders implements Binder { checkNotNull(object.getPayload(), "object payload"); checkArgument(object.getPayload().getContentMetadata().getContentLength() != null, "contentLength must be set, streaming not supported"); - byte[] contentMD5 = object.getContentMetadata().getContentMD5(); - if (contentMD5 != null) { - // Swizzle Content-MD5 to Atmos-specific header - object.getContentMetadata().setContentMD5(null); - request = (R) request.toBuilder() - .addHeader(AtmosHeaders.CHECKSUM, "MD5/0/" + - BaseEncoding.base64().encode(contentMD5)) - .build(); - } return metaBinder.bindToRequest(request, object.getUserMetadata()); } } diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java b/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java index b4d2d3d530..41b328fcf9 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/reference/AtmosHeaders.java @@ -35,6 +35,5 @@ public interface AtmosHeaders { public static final String GROUP_ACL = "x-emc-groupacl"; public static final String UID = "x-emc-uid"; public static final String TOKEN = "x-emc-token"; - public static final String CHECKSUM = "x-emc-wschecksum"; } diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java index 5f3ca335c1..9644406133 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java @@ -99,12 +99,7 @@ public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest