[#198] Fix object metadata
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
e5b1dae750
commit
a89add8ff3
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ func writeHeaders(h http.Header, info *layer.ObjectInfo) {
|
|||
h.Set(api.ETag, info.HashSum)
|
||||
|
||||
for key, val := range info.Headers {
|
||||
h.Set(api.MetadataPrefix+key, val)
|
||||
h[api.MetadataPrefix+key] = []string{val}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ func parseMetadata(r *http.Request) map[string]string {
|
|||
res := make(map[string]string)
|
||||
for k, v := range r.Header {
|
||||
if strings.HasPrefix(k, api.MetadataPrefix) {
|
||||
key := strings.TrimPrefix(k, api.MetadataPrefix)
|
||||
key := strings.ToLower(strings.TrimPrefix(k, api.MetadataPrefix))
|
||||
res[key] = v[0]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue