Skip to content

Commit

Permalink
Parse Cache-Control header from BlobMetadataParser
Browse files Browse the repository at this point in the history
Previously this set a null value.  Found via S3Proxy s3-tests with
Minio.
  • Loading branch information
gaul committed Dec 23, 2024
1 parent 94b42fb commit 6316641
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

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>,
Expand Down Expand Up @@ -75,7 +74,7 @@ public MutableObjectMetadata apply(HttpResponse from) {
}
// 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));
Expand Down

0 comments on commit 6316641

Please sign in to comment.