lucasmoten commented on a change in pull request #4576: URL: https://github.com/apache/nifi/pull/4576#discussion_r511205717
########## File path: nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java ########## @@ -147,6 +171,11 @@ public void onTrigger(final ProcessContext context, final ProcessSession session request = new GetObjectRequest(bucket, key, versionId); } request.setRequesterPays(requesterPays); + if(rangeLength != null) { Review comment: My test results using a file with the following contents as input ``` 0x00000000 5B 2E 53 68 65 6C 6C 43 6C 61 73 73 49 6E 66 6F [.ShellClassInfo 0x00000010 5D 0D 0A 43 4C 53 49 44 3D 7B 36 34 35 46 46 30 ]..CLSID={645FF0 0x00000020 34 30 2D 35 30 38 31 2D 31 30 31 42 2D 39 46 30 40-5081-101B-9F0 0x00000030 38 2D 30 30 41 41 30 30 32 46 39 35 34 45 7D 0D 8-00AA002F954E}. 0x00000040 0A 4C 6F 63 61 6C 69 7A 65 64 52 65 73 6F 75 72 .LocalizedResour 0x00000050 63 65 4E 61 6D 65 3D 40 25 53 79 73 74 65 6D 52 ceName=@%SystemR 0x00000060 6F 6F 74 25 5C 73 79 73 74 65 6D 33 32 5C 73 68 oot%\system32\sh 0x00000070 65 6C 6C 33 32 2E 64 6C 6C 2C 2D 38 39 36 34 0D ell32.dll,-8964. 0x00000080 0A . ``` | Range Start | Range Length | Result | Notes | | --- | --- | --- | --- | | 0B | 0B | PASS | 0B no longer allowed for length, must be set to empty string/unset, and validation picks this up | | 0B | 1B | PASS | 1 byte returned, hex viewer shows 5B 10 (ok, see note below) | | 1B | 1B | PASS | 1 byte returned, hex viewer shows 2E 10 (ok, see note below) | | 0B | 2B | PASS | 2 bytes returned, hex viewer shows 5B 2E | | 120B | 120B | PASS | 9 bytes returned, hex viewer showes 6C 2C 2D 38 39 36 34 0D 0A, the final 9 bytes of the file | | 0B | unset | PASS | 129 bytes returned, hex viewer shows full contents of file | | 120B | unset | PASS | 9 bytes returned, hex viewer showes 6C 2C 2D 38 39 36 34 0D 0A, the final 9 bytes of the file | Known Issues - There is some bug in the hex viewer that shows an extra x10 character when the content is only 1 byte. This isn't introduced by this capability. The above testing was done manually, so this is something that could be applied in a unit test to automate ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org