mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
azure metadata: skip metadata prefixed with "X-"
fix https://github.com/seaweedfs/seaweedfs/issues/3875
This commit is contained in:
parent
abe4a61659
commit
4193dafce1
|
@ -7,6 +7,7 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-storage-blob-go/azblob"
|
||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||
|
@ -187,6 +188,9 @@ func (az *azureRemoteStorageClient) readFileRemoteEntry(loc *remote_pb.RemoteSto
|
|||
func toMetadata(attributes map[string][]byte) map[string]string {
|
||||
metadata := make(map[string]string)
|
||||
for k, v := range attributes {
|
||||
if strings.HasPrefix(k, "X-") {
|
||||
continue
|
||||
}
|
||||
metadata[k] = string(v)
|
||||
}
|
||||
return metadata
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"cloud.google.com/go/storage"
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
|
@ -166,6 +167,9 @@ func (gcs *gcsRemoteStorageClient) readFileRemoteEntry(loc *remote_pb.RemoteStor
|
|||
func toMetadata(attributes map[string][]byte) map[string]string {
|
||||
metadata := make(map[string]string)
|
||||
for k, v := range attributes {
|
||||
if strings.HasPrefix(k, "X-") {
|
||||
continue
|
||||
}
|
||||
metadata[k] = string(v)
|
||||
}
|
||||
return metadata
|
||||
|
|
Loading…
Reference in a new issue