Merge pull request #2 from JankariTech/fixEncoding

Fix encoding
This commit is contained in:
Kakigōri Maker
2023-06-22 19:20:24 +09:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -257,7 +257,7 @@ func (g *GoFakeS3) listBucket(bucketName string, w http.ResponseWriter, r *http.
Contents: objects.Contents,
IsTruncated: objects.IsTruncated,
Delimiter: prefix.Delimiter,
Prefix: prefix.Prefix,
Prefix: URLEncode(prefix.Prefix),
MaxKeys: page.MaxKeys,
}
@@ -280,6 +280,7 @@ func (g *GoFakeS3) listBucket(bucketName string, w http.ResponseWriter, r *http.
KeyCount: int64(len(objects.CommonPrefixes) + len(objects.Contents)),
StartAfter: q.Get("start-after"),
ContinuationToken: q.Get("continuation-token"),
EncodingType: "url",
}
if objects.NextMarker != "" {
// We are just cheating with these continuation tokens; they're just the NextMarker

View File

@@ -248,7 +248,8 @@ type ListBucketResultV2 struct {
NextContinuationToken string `xml:"NextContinuationToken,omitempty"`
// If StartAfter was sent with the request, it is included in the response.
StartAfter string `xml:"StartAfter,omitempty"`
StartAfter string `xml:"StartAfter,omitempty"`
EncodingType string `xml:"EncodingType,omitempty"`
}
type DeleteMarker struct {