mirror of https://github.com/apache/jclouds.git
Parse Cache-Control header from BlobMetadataParser
Previously this set a null value. Found via S3Proxy s3-tests with Minio.
This commit is contained in:
parent
94b42fb7b9
commit
6316641557
|
@ -36,7 +36,6 @@ import org.jclouds.s3.domain.ObjectMetadata.StorageClass;
|
|||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.net.HttpHeaders;
|
||||
|
||||
/** This parses {@ link MutableObjectMetadata} from HTTP headers. */
|
||||
public class ParseObjectMetadataFromHeaders implements Function<HttpResponse, MutableObjectMetadata>,
|
||||
|
@ -75,7 +74,7 @@ public class ParseObjectMetadataFromHeaders implements Function<HttpResponse, Mu
|
|||
}
|
||||
// amz has an etag, but matches syntax for usermetadata
|
||||
to.getUserMetadata().remove("object-etag");
|
||||
to.setCacheControl(from.getFirstHeaderOrNull(HttpHeaders.CACHE_CONTROL));
|
||||
to.setCacheControl(from.getPayload().getContentMetadata().getCacheControl());
|
||||
String storageClass = from.getFirstHeaderOrNull("x-amz-storage-class");
|
||||
if (storageClass != null) {
|
||||
to.setStorageClass(StorageClass.valueOf(storageClass));
|
||||
|
|
Loading…
Reference in New Issue