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

   ## What changes were proposed in this pull request?
   
   S3 Gateway GetObject treated an inverted `Range` (`start > end`) with 
`start` still inside the object as a partial read. For example, a 10-byte 
object with `Range: bytes=8-3` produced `copyLength = -4`, then `new 
byte[getIOBufferSize(-4)]` threw `NegativeArraySizeException`.
   
   `RangeHeaderParserUtil` now treats that case as `readFull` (ignore `Range`, 
HTTP 200), matching observed AWS S3 GetObject. Unsatisfiable ranges (`start >= 
length`) still return 416. The MPU `x-amz-copy-source-range` path is unchanged.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16336
   
   ## How was this patch tested?
   
   - Unit tests: `TestRangeHeaderParserUtil` (new `bytes=8-3` case) and 
existing `TestObjectGet` range cases


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