[#191] Improve copy object compatibility

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-08-06 18:08:09 +03:00 committed by Stanislav Bogatyrev
parent 7eb9713a67
commit f3a6636efd
3 changed files with 36 additions and 20 deletions

View file

@ -38,6 +38,9 @@ func (h *handler) PutObjectHandler(w http.ResponseWriter, r *http.Request) {
)
metadata := parseMetadata(r)
if contentType := r.Header.Get(api.ContentType); len(contentType) > 0 {
metadata[api.ContentType] = contentType
}
params := &layer.PutObjectParams{
Bucket: reqInfo.BucketName,