andyhuangdev opened a new pull request, #11714: URL: https://github.com/apache/ozone/pull/11714
## What changes were proposed in this pull request? S3 Gateway parses x-amz-decoded-content-length during PutObject directory detection, even for non-streaming uploads. Non-numeric or overflowing values cause a NumberFormatException and an HTTP 500 response. This change limits decoded content length parsing to streaming uploads, preserving existing streaming behavior. Non-streaming uploads ignore the header and use Content-Length, matching the Amazon S3 behavior reported in the Jira. It also prevents a decoded length of 0 from incorrectly triggering FSO directory creation for non-empty uploads. ## What is the link to the Apache JIRA [HDDS-17319](https://issues.apache.org/jira/browse/HDDS-17319) ## How was this patch tested? Added regression tests covering ignored decoded content length values for non-streaming uploads and preventing incorrect FSO directory creation. All 112 tests in TestObjectPut passed: mvn -pl :ozone-s3gateway test -Dtest=TestObjectPut -DskipShade -DskipRecon -DskipDocs Checkstyle passed: ./hadoop-ozone/dev-support/checks/checkstyle.sh -- 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]
