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

   ## What changes were proposed in this pull request?
   
   `CompleteMultipartUpload` with no parts returned the S3 error code
   `InvalidRequest`; AWS S3 returns **`MalformedXML`** (HTTP 400 in both cases).
   
   A partless request reaches the gateway in two shapes, and both are now 
aligned to
   `MalformedXML`:
   
   - **Empty request body** e.g. `aws s3api complete-multipart-upload` 
without`--multipart-upload`. `CompleteMultipartUploadRequestUnmarshaller` 
detects the  empty body (added in HDDS-14760) and previously threw 
`InvalidRequest` ("You must specify at least one part"); it now throws 
`MalformedXML`.
   - **Well-formed body with no `<Part>` elements**  e.g. a chunked SDK, or 
`CompletedMultipartUpload.builder().build()`. 
`ObjectEndpoint.completeMultipartUpload` now rejects an empty/absent part list 
up front with `MalformedXML`, before
     contacting OM. Because the gateway now rejects an empty part list before 
the OM call, the OM `INVALID_REQUEST` mapping in the gateway (the "must specify 
at least one part" message) is unreachable and has been removed.
   
   `S3ErrorTable.MALFORMED_XML` already exists, so no new error code or wire 
change
   is introduced.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15831
   
   
   ## How was this patch tested?
   
   https://github.com/rich7420/ozone/actions/runs/29151193111


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