F64116045 opened a new pull request, #11031:
URL: https://github.com/apache/ozone/pull/11031

   ## What changes were proposed in this pull request?
   
   S3 Gateway serializes `OS3Exception` responses as XML, but did not specify 
the response media type. Jersey therefore returned these responses with 
`Content-Type: text/plain`, causing S3 clients such as MinIO SDKs to reject the 
XML error body.
   
   This patch explicitly sets `application/xml` on responses created by 
`OS3ExceptionMapper` and adds unit coverage for the response media type.
   
   Amazon S3 REST error response reference: 
https://docs.aws.amazon.com/AmazonS3/latest/developerguide/ErrorResponses.html
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16189
   
   ## How was this patch tested?
   
   ```shell
   mvn -pl :ozone-s3gateway test -Dtest=TestOS3Exceptions -DskipShade 
-DskipRecon -DskipDocs
   mvn -pl :ozone-s3gateway test -DskipShade -DskipRecon -DskipDocs
   ./hadoop-ozone/dev-support/checks/checkstyle.sh
   ```
   
   `TestOS3Exceptions`: 2 tests passed.
   
   Full `ozone-s3gateway` module: 752 tests passed.
   


-- 
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