Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Replace dashes with underscores in x-amz-meta headers (#3965)

aronneagu180853a2c935
diff --git a/weed/remote_storage/azure/azure_storage_client.go b/weed/remote_storage/azure/azure_storage_client.go
index af67c85657..8183c77a40 100644
--- a/weed/remote_storage/azure/azure_storage_client.go
+++ b/weed/remote_storage/azure/azure_storage_client.go
@@ -187,7 +187,11 @@ func toMetadata(attributes map[string][]byte) map[string]string {
metadata[k[len(s3_constants.AmzUserMetaPrefix):]] = string(v)
}
}
- return metadata
+ parsed_metadata := make(map[string]string)
+ for k, v := range metadata {
+ parsed_metadata[strings.Replace(k, "-", "_", -1)] = v
+ }
+ return parsed_metadata
}
func (az *azureRemoteStorageClient) UpdateFileMetadata(loc *remote_pb.RemoteStorageLocation, oldEntry *filer_pb.Entry, newEntry *filer_pb.Entry) (err error) {