Description
When requesting data through the S3AsyncClient, the data might arrive in several messages. If the message boundary happens to lie inside the 16-byte MD5 checksum, the code that handles the message (ChecksumValidatingPublisher) treats this message as data and passes it to the underlying Subscriber. Worse, it adds it to the checksum, making the message checksum fail.
Expected Behavior
The ChecksumValidatingPublisher should handle any packetization of the incoming message
Current Behavior
Covered above: the current behavior is that the tiny message in the checksum part of the data would be sent into the Subscriber as data, instead of being processed in the ChecksumValidatingPublisher
Possible Solution
Patch is about to be submitted
Steps to Reproduce (for bugs)
Easily reproducible in a unit test, by taking a buffer that contains data + checksum, and sending it to a ChecksumValidatingPublisher in two buffers, with the buffer boundary lying at or beyond the checksum boundary.
Context
Issue was found during development, when trying to asynchronously get data from S3. Client was local, behind a VPN. That is what likely caused the packetization. For the record, running the same program from within the cloud didn't have the issue.
Your Environment
- AWS Java SDK version used: 2.1.0
- JDK version used: 1.8
- Operating System and version: OSX 17.7.0 Darwin Kernel Version 17.7.0