DaveTeng0 commented on PR #4127:
URL: https://github.com/apache/ozone/pull/4127#issuecomment-1418589022

   > > Thanks @xichen01 for filing this jira and this well described PR. I have 
a general comment. Using the current ozone codebase from the master, I tried 
your example illustrating the need for the patch with the aws cli as follows:
   > > ```
   > > $ aws s3api --endpoint http://localhost:9878 create-bucket 
--bucket=wordcount
   > > $ aws s3api --endpoint http://localhost:9878 put-object 
--bucket=wordcount --key file=123 ./README.md
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > I expect to see the `list-object-v2` return just "_file=123_" for both 
_encoding=default_ and _encoding=url_, however when encoding is specified as 
`url`, the response is indeed encoded.
   > > no encoding
   > > ```
   > > $ aws s3api --endpoint http://localhost:9878 list-objects-v2 --bucket 
wordcount 
   > >         {
   > >             "Key": "file=123",
   > >             "LastModified": "2023-01-13T01:33:38.697000+00:00",
   > >             "ETag": "2023-01-13T01:33:38.697Z",
   > >             "Size": 4263,
   > >             "StorageClass": "STANDARD"
   > >         },
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > encoding=url
   > > ```
   > > $ aws s3api --endpoint http://localhost:9878 list-objects-v2 --bucket 
wordcount --encoding-type url
   > >         {
   > >             "Key": "file%3D123",
   > >             "LastModified": "2023-01-13T01:33:38.697000+00:00",
   > >             "ETag": "2023-01-13T01:33:38.697Z",
   > >             "Size": 4263,
   > >             "StorageClass": "STANDARD"
   > >         },
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > It seems to encode the response as expect with aws-cli. Have you seen 
the same? Does that not satisfy what aws supports with 
https://docs.aws.amazon.com/cli/latest/reference/s3api/list-objects-v2.html ?
   > 
   > This issue can not be reproduced in the AWS client, I found two scenarios 
that would be reproduced, one using go-SDK, and the other using spark to access 
Ozone.
   
   Interesting~ Maybe there's some encoding/decoding logic in the s3 gateway?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to