forked from TrueCloudLab/frostfs-http-gw
downloader: set object/container/owner x-attributes after other ones
Avoid name clashes with regular attributes.
This commit is contained in:
parent
f99f9e88a7
commit
91c894cb8c
1 changed files with 3 additions and 3 deletions
|
@ -105,9 +105,6 @@ func (r *request) receiveFile(options *neofs.GetOptions) {
|
|||
dis = "attachment"
|
||||
}
|
||||
r.Response.Header.Set("Content-Length", strconv.FormatUint(obj.PayloadSize(), 10))
|
||||
r.Response.Header.Set("x-object-id", obj.ID().String())
|
||||
r.Response.Header.Set("x-owner-id", obj.OwnerID().String())
|
||||
r.Response.Header.Set("x-container-id", obj.ContainerID().String())
|
||||
for _, attr := range obj.Attributes() {
|
||||
key := attr.Key()
|
||||
val := attr.Value()
|
||||
|
@ -128,6 +125,9 @@ func (r *request) receiveFile(options *neofs.GetOptions) {
|
|||
time.Unix(value, 0).Format(time.RFC1123))
|
||||
}
|
||||
}
|
||||
r.Response.Header.Set("x-object-id", obj.ID().String())
|
||||
r.Response.Header.Set("x-owner-id", obj.OwnerID().String())
|
||||
r.Response.Header.Set("x-container-id", obj.ContainerID().String())
|
||||
r.SetContentType(writer.contentType)
|
||||
r.Response.Header.Set("Content-Disposition", dis+"; filename="+path.Base(filename))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue