ncw / swift

Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)
MIT License
310 stars 107 forks source link

slo: no headers for segments #172

Open stefanhipfel opened 3 years ago

stefanhipfel commented 3 years ago

When creating a slo, no headers are written to the segment objects: headers, err := file.conn.ObjectPut(file.segmentContainer, segmentName, segmentReader, true, "", file.contentType, nil) https://github.com/ncw/swift/blob/master/largeobjects.go#L403

In my case I want to pass a X-Delete-At parameter also to the segments that are created. Otherwise they will be orphaned once the actual file is expired and deleted.

Can we pass in the headers from the file itself? headers, err := file.conn.ObjectPut(file.segmentContainer, segmentName, segmentReader, true, "", file.contentType, file.headers)

thanks!

IvoGoman commented 2 months ago

@ncw would you accept a PR for this?