mirror of
https://github.com/rclone/rclone.git
synced 2025-08-14 07:49:00 +02:00
serve s3: fix list objects encoding-type
Before this change rclone would always use encoding-type url even if the client hadn't asked for it. This confused some clients. This fixes the problem by leaving the URL encoding to the gofakes3 library which has also been fixed. Fixes #7836
This commit is contained in:
@ -52,7 +52,7 @@ func (b *s3Backend) ListBuckets(ctx context.Context) ([]gofakes3.BucketInfo, err
|
||||
for _, entry := range dirEntries {
|
||||
if entry.IsDir() {
|
||||
response = append(response, gofakes3.BucketInfo{
|
||||
Name: gofakes3.URLEncode(entry.Name()),
|
||||
Name: entry.Name(),
|
||||
CreationDate: gofakes3.NewContentTime(entry.ModTime()),
|
||||
})
|
||||
}
|
||||
@ -227,7 +227,7 @@ func (b *s3Backend) GetObject(ctx context.Context, bucketName, objectName string
|
||||
}
|
||||
|
||||
return &gofakes3.Object{
|
||||
Name: gofakes3.URLEncode(objectName),
|
||||
Name: objectName,
|
||||
Hash: hash,
|
||||
Metadata: meta,
|
||||
Size: size,
|
||||
|
Reference in New Issue
Block a user