From 293debe6db94fcdfbd96d96b975f50e1df50f6df Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 30 Apr 2021 12:55:51 +0300 Subject: [PATCH] downloader: ensure downloader/uploader header symmetry Use X-Attribute-* everywhere. --- README.md | 4 ++-- downloader/download.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d15a01f..79a387a 100644 --- a/README.md +++ b/README.md @@ -213,9 +213,9 @@ set of reply headers generated using the following rules: * `x-container-id` contains container ID * `x-object-id` contains object ID * `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` - attribute becomes `x-FileName` + attribute becomes `X-Attribute-FileName` header ### Uploading diff --git a/downloader/download.go b/downloader/download.go index 037710d..05a3bde 100644 --- a/downloader/download.go +++ b/downloader/download.go @@ -133,7 +133,7 @@ func (r *request) receiveFile(options *neofs.GetOptions) { if !isValidToken(key) || !isValidValue(val) { continue } - r.Response.Header.Set("x-"+key, val) + r.Response.Header.Set("X-Attribute-"+key, val) switch key { case object.AttributeFileName: filename = val