NIFI-6832: When receiving a 0-byte FlowFile via site-to-site, avoid writing to the FlowFile at all

This commit is contained in:
Mark Payne 2019-11-01 16:02:56 -04:00 committed by Bryan Bende
parent 5b28f6dad9
commit 0b3a60ae3e
1 changed files with 5 additions and 1 deletions

View File

@ -446,7 +446,11 @@ public abstract class AbstractFlowFileServerProtocol implements ServerProtocol {
break;
}
FlowFile flowFile = session.create();
flowFile = session.importFrom(dataPacket.getData(), flowFile);
if (dataPacket.getSize() > 0) {
flowFile = session.importFrom(dataPacket.getData(), flowFile);
}
flowFile = session.putAllAttributes(flowFile, dataPacket.getAttributes());
if (handshakeProperties.isUseGzip()) {