Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 6316641

Browse files
committed
Parse Cache-Control header from BlobMetadataParser
Previously this set a null value. Found via S3Proxy s3-tests with Minio.
1 parent 94b42fb commit 6316641

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apis/s3/src/main/java/org/jclouds/s3/functions/ParseObjectMetadataFromHeaders.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
import com.google.common.annotations.VisibleForTesting;
3838
import com.google.common.base.Function;
39-
import com.google.common.net.HttpHeaders;
4039

4140
/** This parses {@ link MutableObjectMetadata} from HTTP headers. */
4241
public class ParseObjectMetadataFromHeaders implements Function<HttpResponse, MutableObjectMetadata>,
@@ -75,7 +74,7 @@ public MutableObjectMetadata apply(HttpResponse from) {
7574
}
7675
// amz has an etag, but matches syntax for usermetadata
7776
to.getUserMetadata().remove("object-etag");
78-
to.setCacheControl(from.getFirstHeaderOrNull(HttpHeaders.CACHE_CONTROL));
77+
to.setCacheControl(from.getPayload().getContentMetadata().getCacheControl());
7978
String storageClass = from.getFirstHeaderOrNull("x-amz-storage-class");
8079
if (storageClass != null) {
8180
to.setStorageClass(StorageClass.valueOf(storageClass));

0 commit comments

Comments
 (0)