mirror of https://github.com/apache/jclouds.git
Fixed S3 stub bug that prevented object's content type being PUT correctly.
git-svn-id: http://jclouds.googlecode.com/svn/trunk@848 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
350469d618
commit
a64a85412b
|
@ -427,7 +427,7 @@ public class StubS3Connection implements S3Connection {
|
|||
byte[] data = toByteArray(object.getData());
|
||||
final byte[] md5 = S3Utils.md5(data);
|
||||
newMd.setMd5(md5);
|
||||
newMd.setContentType("binary/octet-stream");
|
||||
newMd.setContentType(object.getMetadata().getContentType());
|
||||
if (options.getAcl() != null)
|
||||
keyToAcl.put(bucketName + object, options.getAcl());
|
||||
bucketToContents.get(bucketName).put(object.getKey(), new S3Object(newMd, data));
|
||||
|
|
|
@ -97,8 +97,7 @@ public class PutObjectIntegrationTest extends S3IntegrationTest {
|
|||
addObjectToBucket(bucketName, object);
|
||||
S3Object newObject = validateContent(bucketName, key);
|
||||
|
||||
// TODO.. why does this come back as binary/octetstring
|
||||
assertEquals(newObject.getMetadata().getContentType(), "binary/octet-stream");
|
||||
assertEquals(newObject.getMetadata().getContentType(), "text/plain");
|
||||
assertEquals(newObject.getMetadata().getContentEncoding(), "x-compress");
|
||||
assertEquals(newObject.getMetadata().getContentDisposition(),
|
||||
"attachment; filename=hello.txt");
|
||||
|
|
Loading…
Reference in New Issue