forked from TrueCloudLab/frostfs-http-gw
downloader: ensure downloader/uploader header symmetry
Use X-Attribute-* everywhere.
This commit is contained in:
parent
e80d147d72
commit
293debe6db
2 changed files with 3 additions and 3 deletions
|
@ -213,9 +213,9 @@ set of reply headers generated using the following rules:
|
||||||
* `x-container-id` contains container ID
|
* `x-container-id` contains container ID
|
||||||
* `x-object-id` contains object ID
|
* `x-object-id` contains object ID
|
||||||
* `x-owner-id` contains owner address
|
* `x-owner-id` contains owner address
|
||||||
* all the other NeoFS attributes are converted to `x-*` attributes (but only
|
* all the other NeoFS attributes are converted to `X-Attribute-*` headers (but only
|
||||||
if they can be safely represented in HTTP header), for example `FileName`
|
if they can be safely represented in HTTP header), for example `FileName`
|
||||||
attribute becomes `x-FileName`
|
attribute becomes `X-Attribute-FileName` header
|
||||||
|
|
||||||
### Uploading
|
### Uploading
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ func (r *request) receiveFile(options *neofs.GetOptions) {
|
||||||
if !isValidToken(key) || !isValidValue(val) {
|
if !isValidToken(key) || !isValidValue(val) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
r.Response.Header.Set("x-"+key, val)
|
r.Response.Header.Set("X-Attribute-"+key, val)
|
||||||
switch key {
|
switch key {
|
||||||
case object.AttributeFileName:
|
case object.AttributeFileName:
|
||||||
filename = val
|
filename = val
|
||||||
|
|
Loading…
Reference in a new issue