-
Notifications
You must be signed in to change notification settings - Fork 364
Closed
Labels
Description
Using the version 3.0.3, I am getting different swift objects from osclient.objectStorage().objects().list(containerName) versus osclient.objectStorage().objects().get(containerName, name) in that the former gives me a list of SwiftObjectImpl containing ETag, wheres the latter gives me a single SwiftObjectImpl with no ETag. In this particular use case I only want the ETag for the individual file I am downloading with get, so it's unfortunate that the ETag isn't there.
The SwiftObjectImpl in the get() case is being built in an apply method on the ParseObjectFunction:
@Override
public SwiftObject apply(HttpResponse resp) {
return SwiftObjectImpl.builder()
.name(location.getObjectName())
.containerName(location.getContainerName())
.mimeType(resp.header(CONTENT_TYPE))
.sizeBytes(asLong(resp.header(CONTENT_LENGTH)))
.metadata(MapWithoutMetaPrefixFunction.INSTANCE.apply(resp.headers()))
.lastModified(Parser.toRFC822DateParse(resp.header(LAST_MODIFIED)))
.build();
which includes explicit handling of content type and content length, but it seems to me it's just not handling etags.