CopyObject:Set Content-Type to application/octet-stream if it is not set (#6958)

master
kannappanr 6 years ago committed by GitHub
parent d2f8f8c7ee
commit 7881791a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmd/handler-utils.go

@ -134,6 +134,11 @@ func extractMetadata(ctx context.Context, r *http.Request) (metadata map[string]
return nil, err
}
// Set content-type to default value if it is not set.
if _, ok := metadata["content-type"]; !ok {
metadata["content-type"] = "application/octet-stream"
}
// Success.
return metadata, nil
}

Loading…
Cancel
Save