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

   ## What changes were proposed in this pull request?
   This PR updates the S3 Gateway error handling logic to return the 
`InvalidDigest` error code instead of `BadDigest` when a malformed 
`Content-MD5` header is encountered.
   
   ## Please describe your PR in detail:
   * Add `InvalidDigest` error.
   * Validate the `Content-MD5` header and return `InvalidDigest` when it is 
malformed (e.g. invalid Base64) or its decoded length is not 16 bytes.
   
   ## What is the link to the Apache JIRA?
   https://issues.apache.org/jira/browse/HDDS-15032
   
   ## How was this patch tested?
   * green ci: https://github.com/hevinhsu/ozone/actions/runs/24383695714
   * Verified locally using ceph s3-tests:
     - 
[test_object_create_bad_md5_invalid_short](https://github.com/ceph/s3-tests/blob/master/s3tests/functional/test_headers.py#L158)
     - 
[test_object_create_bad_md5_empty](https://github.com/ceph/s3-tests/blob/master/s3tests/functional/test_headers.py#L158)


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